Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

problem with inserting data using Jsp and Servlet

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic