• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with inserting data using Jsp and Servlet

 
athi ram
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic