permaculture playing cards*
The moose likes Servlets and the fly likes I am getting error when i submit form from home.jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "I am getting error when i submit form from home.jsp" Watch "I am getting error when i submit form from home.jsp" New topic
Author

I am getting error when i submit form from home.jsp

mohammed rafi syed
Greenhorn

Joined: Aug 09, 2012
Posts: 3
i am getting this error when i submit the form

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
rafipackage.validate.processRequest(validate.java:52)
rafipackage.validate.doGet(validate.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.22 logs.

Apache Tomcat/7.0.22


please give me solution to this problem i am using netbeans 7.1 ide and tomcat as server
Rajasekhar Pentakota
Ranch Hand

Joined: Aug 28, 2007
Posts: 38

Can you please provide your jsp code also attach the log file.


Thanks
Raja
Pyla Rao
Ranch Hand

Joined: Jul 10, 2012
Posts: 50
If you can provide source , then it is better view and track the problem. Because in many cases we are getting 500 type errors.
mohammed rafi syed
Greenhorn

Joined: Aug 09, 2012
Posts: 3
Rajasekhar Pentakota wrote:Can you please provide your jsp code also attach the log file.


this is the home .jsp


<%--
Document : home
Created on : Aug 9, 2012, 1:16:08 PM
Author : Mohammed Rafi
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<form action="validate">
<h2>Enter your details to view<h2>
<thead> </thead> <tbody> </tbody>
First Name <input type="text" name="first" value="" size="10" />
Last Name <input type="text" name="last" value="" size="10" />
<input type="submit" value="SUBMIT"/> <input type="reset" value="RESET" />


</form>
</body>
</html>

this is servlet code validate.java

package rafipackage;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
*
* @author Mohammed Rafi
*/
public class validate extends HttpServlet {

/**
* Processes requests for both HTTP
* <code>GET</code> and
* <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
String fname=request.getParameter("first");
String lname=request.getParameter("last");
Statement st=null;
try {
Class.forName("org.apache.derby.jdbc.ClientDriver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}
Connection com=null;
try {
com = DriverManager.getConnection("jdbc:derby://localhost:1527/names","rafi","rafi");
} catch (SQLException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}
try {
st=com.createStatement();
} catch (SQLException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}
ResultSet rs=null;
try {
rs=st.executeQuery("select firstname,lastname from names");
} catch (SQLException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}
try {
if(rs.next())
{
fname=rs.getString("firstname");
lname=rs.getString("lastname");
out.println("<html>");
out.println("<head>");
out.println("<title>Display page</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>First name is" +fname+"</h1>");
out.println("<h1>Last name is" +lname +"</h1>");
}
} catch (SQLException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}

}

// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP
* <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

/**
* Handles the HTTP
* <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}




this is the log file



Using CATALINA_BASE: "C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base"
Using CATALINA_HOME: "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.22"
Using CATALINA_TMPDIR: "C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.6.0_21"
Using CLASSPATH: "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.22\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.22\bin\tomcat-juli.jar"
Aug 9, 2012 8:55:02 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_21\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Java\jdk1.6.0_21\bin
Aug 9, 2012 8:55:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8084"]
Aug 9, 2012 8:55:09 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 9, 2012 8:55:09 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 8332 ms
Aug 9, 2012 8:55:09 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 9, 2012 8:55:09 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.22
Aug 9, 2012 8:55:09 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:11 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [857] milliseconds.
Aug 9, 2012 8:55:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor new.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:13 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor rafiexample.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:13 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:13 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor sample1.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:13 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Users\Mohammed Rafi\Documents\NetBeansProjects\sample1\build\web does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4836)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5016)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1329)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:389)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:334)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Aug 9, 2012 8:55:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in resourceStart()
Aug 9, 2012 8:55:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Aug 9, 2012 8:55:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/sample1] startup failed due to previous errors
Aug 9, 2012 8:55:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8084"]
Aug 9, 2012 8:55:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 9, 2012 8:55:13 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4296 ms
Aug 9, 2012 8:55:17 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/rafiexample]
Aug 9, 2012 8:55:18 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor rafiexample.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:18 PM org.apache.catalina.util.LifecycleBase start
INFO: The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rafiexample]] after start() had already been called. The second call will be ignored.
mohammed rafi syed
Greenhorn

Joined: Aug 09, 2012
Posts: 3
Pyla Rao wrote:If you can provide source , then it is better view and track the problem. Because in many cases we are getting 500 type errors.





this is the home .jsp


<%--
Document : home
Created on : Aug 9, 2012, 1:16:08 PM
Author : Mohammed Rafi
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<form action="validate">
<h2>Enter your details to view<h2>

<thead>




</thead>
<tbody>












</tbody>
First Name <input type="text" name="first" value="" size="10" />
Last Name <input type="text" name="last" value="" size="10" />
<input type="submit" value="SUBMIT"/> <input type="reset" value="RESET" />


</form>
</body>
</html>

this is servlet code validate.java

package rafipackage;

import java.io.IOException;
import java.io.PrintWriter;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
*
* @author Mohammed Rafi
*/
public class validate extends HttpServlet {

/**
* Processes requests for both HTTP
* <code>GET</code> and
* <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
String fname=request.getParameter("first");
String lname=request.getParameter("last");
Statement st=null;
try {
Class.forName("org.apache.derby.jdbc.ClientDriver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}
Connection com=null;
try {
com = DriverManager.getConnection("jdbc:derby://localhost:1527/names","rafi","rafi");
} catch (SQLException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}
try {
st=com.createStatement();
} catch (SQLException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}
ResultSet rs=null;
try {
rs=st.executeQuery("select firstname,lastname from names");
} catch (SQLException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}
try {
if(rs.next())
{
fname=rs.getString("firstname");
lname=rs.getString("lastname");
out.println("<html>");
out.println("<head>");
out.println("<title>Display page</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>First name is" +fname+"</h1>");
out.println("<h1>Last name is" +lname +"</h1>");
}
} catch (SQLException ex) {
Logger.getLogger(validate.class.getName()).log(Level.SEVERE, null, ex);
}

}

// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP
* <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

/**
* Handles the HTTP
* <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}




this is the log file



Using CATALINA_BASE: "C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base"
Using CATALINA_HOME: "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.22"
Using CATALINA_TMPDIR: "C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.6.0_21"
Using CLASSPATH: "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.22\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.22\bin\tomcat-juli.jar"
Aug 9, 2012 8:55:02 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_21\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Java\jdk1.6.0_21\bin
Aug 9, 2012 8:55:08 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8084"]
Aug 9, 2012 8:55:09 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 9, 2012 8:55:09 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 8332 ms
Aug 9, 2012 8:55:09 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 9, 2012 8:55:09 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.22
Aug 9, 2012 8:55:09 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:11 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [857] milliseconds.
Aug 9, 2012 8:55:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor new.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:13 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor rafiexample.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:13 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:13 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor sample1.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:13 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Users\Mohammed Rafi\Documents\NetBeansProjects\sample1\build\web does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4836)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5016)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:633)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:558)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:468)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1329)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:389)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:334)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Aug 9, 2012 8:55:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in resourceStart()
Aug 9, 2012 8:55:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Aug 9, 2012 8:55:13 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/sample1] startup failed due to previous errors
Aug 9, 2012 8:55:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8084"]
Aug 9, 2012 8:55:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 9, 2012 8:55:13 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4296 ms
Aug 9, 2012 8:55:17 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/rafiexample]
Aug 9, 2012 8:55:18 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor rafiexample.xml from C:\Users\Mohammed Rafi\.netbeans\7.1.2\apache-tomcat-7.0.22.0_base\conf\Catalina\localhost
Aug 9, 2012 8:55:18 PM org.apache.catalina.util.LifecycleBase start
INFO: The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rafiexample]] after start() had already been called. The second call will be ignored.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: I am getting error when i submit form from home.jsp