| Author |
problem with inserting data using Jsp and Servlet
|
athi ram
Greenhorn
Joined: Feb 28, 2011
Posts: 6
|
|
DataBase:PostgreSQL8.3
Table:
Jdk1.6
//ServletUser.java
//AddForm.jsp
i am using Eclipse
Steps:http://localhost:8081/AddDataBase/
i got output ----->Record has been inserted
but no data in sample table.
i want know how to show jsp page first after i insert different data to sample table
please help me
|
 |
Avi Abrami
Ranch Hand
Joined: Oct 11, 2000
Posts: 1114
|
|
Athi,
In my opinion, based on the information you provided, this is not a JDBC question.
In your file AddForm.jsp:
<form name="TestForm" method="post" action="/ServletUser">
This means the doPost method in servlet ServletUser will be invoked.
However I could not find the code for method doPost in the servlet code you posted, only the doGet method.
Nonetheless you claim that the servlet code is being executed.
This means you have either supplied incomplete or erroneous information which makes it difficult for others to help you.
You ask:
i want know how to show jsp page first after i insert different data to sample table
Which JSP page are you referring to? AddForm.jsp ?
How is this related to your claim that after the servlet method executes, you are seeing no data in the database?
Good Luck,
Avi.
|
 |
 |
|
|
subject: problem with inserting data using Jsp and Servlet
|
|
|