• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp and servlet inserting into database

 
mehdi chorsi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello All

i'm new in java and i need your help i want insert into database with these pages but it doesn't work

this is my jsp page
class_Types.jsp


my Servlet code:
ClassTypesServlet.java



my database connection :

databaseconnection.java



InsertDataDAO .java



Declaration.java




i really need help its very argent

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ItDoesntWorkIsUseless -- please explain what is happening in detail and where in the the code you posted the problems lie.
 
mehdi chorsi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:ItDoesntWorkIsUseless -- please explain what is happening in detail and where in the the code you posted the problems lie.


when i click on submit button in class_types.jsp this page post data to ClassTypesServlet.java and in there nothing happen and data doesn't insert in database
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you done to debug your servlet so far? At minimum, you can add logging statements to see how far it's getting and what it is doing.

You'll get a lot more help when you put in the effort to narrow down what's not working and posting the relevant code, rather than posting all the code and saying "Somewhere in all this code something is not working."

In this particular case however, it's easy to see that nothing is happening because your servlet method implementations are empty. It should not surprise you that nothing happens when there is no code!
 
mehdi chorsi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:What have you done to debug your servlet so far? At minimum, you can add logging statements to see how far it's getting and what it is doing.

You'll get a lot more help when you put in the effort to narrow down what's not working and posting the relevant code, rather than posting all the code and saying "Somewhere in all this code something is not working."

In this particular case however, it's easy to see that nothing is happening because your servlet method implementations are empty. It should not surprise you that nothing happens when there is no code!


i told i'm new could you please tell me what i must to do ?

i'm confused !!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mrc rcm wrote:i told i'm new could you please tell me what i must to do ?

Being new doesn't relieve you of any responsibility to put some effort into your code and posts.

You said that you issue a POST request. That will cause your doPost() method to execute. Please explain to me, in the code that follows, what is supposed to happen.
 
mehdi chorsi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
mrc rcm wrote:i told i'm new could you please tell me what i must to do ?

Being new doesn't relieve you of any responsibility to put some effort into your code and posts.

You said that you issue a POST request. That will cause your doPost() method to execute. Please explain to me, in the code that follows, what is supposed to happen.


thank you very mach i understand now really thanks
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a similar issue. And Unlike this piece of code I have not commented the processrequest method.
Now, I am trying to insert data into my database with the following steps,

I first created a database called erpl and under which there is a table called bkpl.
Now, all the related fields are being entered by the client in this InsertDetails.jsp which transfers control to InsertData.java . Now what i cnt figure out is what is wrong that my data is not going to the database.
I have added the required connector to the library, Please go through the code and help!!

This is the jsp page

<%--
Document : InsertDetails
Created on : 11 Jun, 2013, 11:26:58 AM
Author : Priya
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert AF Details</title>
</head>
<body>
<form action="InsertData" method="post">
<center>
<h4>INSERT AG DETAILS</h4>
<table>
<tr>
<td>AF Scheme Number</td>
<td><input type="text" name="Af_Scheme_Number"/></td>
</tr>
<tr>
<td>AF Scheme Type(In-principle/Final):-</td>
<td><input type="text" name="Af_Scheme_Type"/></td>
</tr>
<tr>
<td>Granted By:-</td>
<td><input type="text" name="GrantedBy"/></td>
</tr>
<tr>
<td>AF Scheme Details:-</td>
<td><input type="text" name="Af_Scheme_Details"/></td>
</tr>
<tr>
<td>Amount:-</td>
<td><input type="text" name="Amount"/></td>
</tr>
<tr>
<td>Approval_Date:-</td>
<td><input type="text" name="Approval_Date"/></td>
</tr>
<tr>
<td>Completion Period:-</td>
<td><input type="text" name="Completion_Period"/></td>
</tr>
<tr>
<td>Original Completion Date:-</td>
<td><input type="text" name="Original_Completion_Date"/></td>
</tr>
<tr>
<td>Remarks:-</td>
<td><input type ="text" name="Remarks"/></td>
</tr>
<tr>
<td></td>
<td><input type="SUBMIT" value="submit"/></td>
</tr>
</table>
</center>
</form>
</body>
</html>


This is my java file that establishes connection


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;


public class DatabaseConnection {
Connection conn;
Statement stmt;
ResultSet res;

public DatabaseConnection(){

}

public Connection setConnection(){
try{
Class.forName("com.mysql.jdbc.Driver");
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/erpl","root","admin");

}catch(Exception e){

}
return conn;
}

public ResultSet getResult(String sql,Connection conn){
this.conn=conn;
try{
stmt=conn.createStatement();
res=stmt.executeQuery(sql);
}catch(Exception e){

}
return res;
}
}


ANd this is the sevlet that fraking the shit out of me-



import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
*
* @author Priya
*/
public class InsertData extends HttpServlet {

String Af_Scheme_Number, Af_Scheme_Type, GrantedBy, Af_Scheme_Details, Amount, Approval_Date,
Completion_Period, Original_Completion_Date, Remarks;
String query;
Connection conn;
Statement stmt;
ResultSet res;
DatabaseConnection dbconn;


protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {

dbconn=new DatabaseConnection();

Af_Scheme_Number=request.getParameter("Af_Scheme_Number");
Af_Scheme_Type=request.getParameter("Af_Scheme_Type");
GrantedBy=request.getParameter("GrantedBy");
Af_Scheme_Details=request.getParameter("Af_Scheme_Details");
Amount=request.getParameter(" Amount");
Approval_Date=request.getParameter("Approval_Date");
Completion_Period=request.getParameter("Completion_Period");
Original_Completion_Date=request.getParameter("Original_Completion_Date");
Remarks=request.getParameter("Remarks");

conn=dbconn.setConnection();
stmt=conn.createStatement();
query= "insert into bkpl(Af_Scheme_Number,Af_Scheme_Type,GrantedBy,Af_Scheme_Details,Amount,Approval_Date,Completion_Period,Original_Completion_Date,Remarks)"+
" values('"+Af_Scheme_Number+"','"+Af_Scheme_Type+"','"+GrantedBy+"','"+Af_Scheme_Details+"','"+Amount+"','"+ Approval_Date+"','"+Completion_Period+"','"+Original_Completion_Date+"','"+Remarks+"')";
int i=stmt.executeUpdate(query);

} catch(Exception e){
request.setAttribute("Error",e);
RequestDispatcher rd= request.getRequestDispatcher("/error.jsp");
rd.forward(request, response);
}finally {
// RequestDispatcher rd= request.getRequestDispatcher("index.jsp");
// rd.forward(request, response);
out.close();
}
}


@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}


@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}


@Override
public String getServletInfo() {
return "Short description";
}
}


 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through what code? You haven't posted any.
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Go through what code? You haven't posted any.



Yep see the code now..I have pasted the thing
 
bharat salunkhe
Greenhorn
Posts: 25
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
solved ??
what is the error?
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bharat salunkhe wrote:solved ??
what is the error?



There is no error. The code runs perfect. But the data inserted by the client doesn't reach the database. Can you tell me why?
 
bharat salunkhe
Greenhorn
Posts: 25
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Priya Prasad wrote:
There is no error. The code runs perfect. But the data inserted by the client doesn't reach the database. Can you tell me why?


Write query like this might work..
insert into erpl.bkpl(Af_Scheme_Number,Af_Scheme_Type,GrantedBy,Af_Scheme_Details,Amount,Approval_Date,Completion_Period,Original_Completion_Date,Remarks) values(1,"A","B","C",11,"111","1ds","asd","asd");

just change bkpl to erpl.bkpl
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Write query like this might work..
insert into erpl.bkpl(Af_Scheme_Number,Af_Scheme_Type,GrantedBy,Af_Scheme_Details,Amount,Approval_Date,Completion_Period,Original_Completion_Date,Remarks) values(1,"A","B","C",11,"111","1ds","asd","asd");

just change bkpl to erpl.bkpl


Hey!, I tried doing that, Also let me try and explain you what the issue is. I am using Netbeans. And when i run the project the connection is supposed to be established. And when the connection is established the Database Connection icon of jdbc:mysql://localhost:3306/erpl [root on Default schema] changes from a cracked one to a connected one. But after i run the program, I see that this icon has not changed. Which means that there is sum problem here to establish the connection. The code seems fine to me, I am like harassed with this code now. Can I send you the project file for you to see? Although i have attached the code here, kindly help please!
This is my summer internship project and i have deadline but i m stuck at a very silly issue.
 
bharat salunkhe
Greenhorn
Posts: 25
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Priya Prasad wrote:
There is no error. The code runs perfect. But the data inserted by the client doesn't reach the database. Can you tell me why?


Solved !!!
your servlet !!

do your table on auto increment..
add this jar mysql-connector-java-5.1.19-bin.jar
 
bharat salunkhe
Greenhorn
Posts: 25
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

this is your connection class please change your username and password
make sure you added your JAR its important !
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Solved !!!
your servlet !!

do your table on auto increment..
add this jar mysql-connector-java-5.1.19-bin.jar

Ok..but i have already added this jar file to the Libraries sub folder option available in the Project in Netbeans. Is there anything more that i have to do? It's not working!
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bharat salunkhe wrote:
this is your connection class please change your username and password
make sure you added your JAR its important !



i have added mysql-connector-java-5.1.6.jar And why do i change my username and password?
 
bharat salunkhe
Greenhorn
Posts: 25
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
means root root is my database id password you have to put your own password there that is "root","admin"
if still not working then what is the errors? i done same example n its working fine.. check the console n tell me errors
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WARNING: ApplicationDispatcher[/IOCL] PWC1231: Servlet.service() for servlet jsp threw exception
and

WARNING: StandardWrapperValve[InsertData]: PWC1406: Servlet.service() for servlet InsertData threw exception
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bharat salunkhe wrote: means root root is my database id password you have to put your own password there that is "root","admin"
if still not working then what is the errors? i done same example n its working fine.. check the console n tell me errors



oh yes that i have done, i have used a jar file and set up my username passwrd everythng..I get two warnings in the Glassfish output console

but my Java DB output shows
Wed Jun 12 12:36:47 IST 2013 : Security manager installed using the Basic server security policy.
Wed Jun 12 12:36:48 IST 2013 : Apache Derby Network Server - 10.8.1.2 - (1095077) started and ready to accept connections on port 1527

I dnt get why as i am not using Apache Server and its opening the connection on port 1527
 
bharat salunkhe
Greenhorn
Posts: 25
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after change this example working fine for me.. why dont you use tomcat ?
 
bharat salunkhe
Greenhorn
Posts: 25
Eclipse IDE Java Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for use of apache tomcat just right click on project then click on run and change the server Apache Tomcat
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bharat salunkhe wrote:for use of apache tomcat just right click on project then click on run and change the server Apache Tomcat

There should be no difference what server is used. Either Glassfish or Tomcat will behave the same.
If the same code works on one system but not on other, it is usually a configuration issue, nothing related to the server.
 
Priya Prasad
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bharat salunkhe wrote:for use of apache tomcat just right click on project then click on run and change the server Apache Tomcat


changed the server to tomcat and this is the error log

Jun 13, 2013 10:07:53 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 13, 2013 10:07:53 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 13, 2013 10:07:53 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@284112')
Jun 13, 2013 10:11:43 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Jun 13, 2013 10:11:43 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Jun 13, 2013 10:11:49 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 13, 2013 10:11:49 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 13, 2013 10:11:49 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@dddeac')
Jun 13, 2013 10:25:25 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Jun 13, 2013 10:25:25 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Jun 13, 2013 10:25:49 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 13, 2013 10:25:49 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 13, 2013 10:25:49 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1bce0d6')
Jun 13, 2013 10:27:10 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [InsertData] in context with path [/IOCL] threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:349)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at InsertData.processRequest(InsertData.java:62)
at InsertData.doPost(InsertData.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Jun 13, 2013 10:28:10 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [InsertData] in context with path [/IOCL] threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:349)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at InsertData.processRequest(InsertData.java:62)
at InsertData.doPost(InsertData.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Jun 13, 2013 10:41:29 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [InsertData] in context with path [/IOCL] threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:349)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at InsertData.processRequest(InsertData.java:62)
at InsertData.doPost(InsertData.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Jun 13, 2013 11:35:26 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [InsertData] in context with path [/RedoIOCL] threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:349)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at Controller.InsertData.processRequest(InsertData.java:61)
at Controller.InsertData.doPost(InsertData.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Jun 13, 2013 11:36:47 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Jun 13, 2013 11:36:47 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Jun 13, 2013 11:36:56 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 13, 2013 11:36:56 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 13, 2013 11:36:56 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@e335ef')
 
bharat salunkhe
Greenhorn
Posts: 25
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check out your massage
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!