Java

How to parse XML file using XPath parser

XPath is used to parse a XML document whenever we know  what we have to parse like: tag name, attribute name. That means we can directly indicate and parse whatever(tag or attribute value) we want to parse.   Lets see an example:   package com.sourav.xpathex; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; …

How to parse XML file using XPath parser Read More »

Spring MVC HelloWorld Example With Maven, Bootstrap and Logging(Log4j)

Spring MVC HelloWorld Example With Maven, Bootstrap and Logging(Log4j): In this tutorial we are going to see a project based on Spring MVC,  Maven, Bootstrap and Log4j. This example is actually for showing use of Logging(using Log4j) in Spring MVC based application. If want to know why logging is important  then visit  importance of logging. For knowing what is Log4j …

Spring MVC HelloWorld Example With Maven, Bootstrap and Logging(Log4j) Read More »

Spring MVC HelloWorld Example With Maven and Bootstrap

Spring MVC HelloWorld Example With Maven and Bootstrap: Used Technologies: 1. Spring Framework 2. Jsp, HTML, CSS, Bootstrap 3. Built Tool: Maven 4. Server: tomcat Final Project Structure: Jsp pages: Index.jsp   <% response.sendRedirect(“dashboard.do”);%>   customer.jsp   <!DOCTYPE html> <%@ taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core”%> <%@ taglib prefix=”form” uri=”http://www.springframework.org/tags/form”%> <%@ taglib prefix=”spring” uri=”http://www.springframework.org/tags”%> <html> <head> <meta http-equiv=”Content-Type” …

Spring MVC HelloWorld Example With Maven and Bootstrap Read More »

Why and Where to use Log4j?

Why and Where to use Log4j? Suppose we are writing code to develop a software. For tracking and debugging our code, we generally write “system.out.println(“Your message”); “ . So, we will write system.out.println(“Your message”); statement as much as we need. Let’s say we have written 100 lines of this statement.   Now think, release of …

Why and Where to use Log4j? Read More »

What is Log4j?

Log4j: Log4j is a framework written in java which is highly configurable. Here one question may come that what do we mean by “Framework” ? Framework is nothing but a partially or semi build application. One can use it for building other software. Log4j is used in java application for writing log in the code. …

What is Log4j? Read More »

Why logging is important in software development?

Why logging is important in software development? Logging is an important component of software development. Through Logging, we can show the various steps, values, errors, exclusions and information of a software and save it in the file. A good labeled logging code helps to quickly debugging, easy maintenance and displaying an application’s run-time information and …

Why logging is important in software development? Read More »

How to resolve “The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path” problem in eclipse?

Problem : Or if you “run as server” you can see the error like: “The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path”   Solutions: Method 1: Right Click on your project folder, Choose Property>Project Facets Then select Runtimes and choose your desired server and click Apply>Ok       Method 2: If …

How to resolve “The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path” problem in eclipse? Read More »