Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes JSP and the fly likes Problem with saving user information in database via Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with saving user information in database via "saveuser" servlet" Watch "Problem with saving user information in database via "saveuser" servlet" New topic
Author

Problem with saving user information in database via "saveuser" servlet

Purva Sharma
Greenhorn

Joined: Jul 02, 2013
Posts: 2
I am making my minor project on a money management website
One problem is occurring:
As we are registering via register.jsp page, the form in that jsp page calls the "saveuser" servlet which saves the user data in the database.
But the data is not getting saved. :confused:
Please give an answer very soon

Following is the code of register.jsp page:



And this is the code of "saveuser" servlet:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62317
    
  68

As in your other post, you should be using doPost() for this -- proceesRequest is meaningless and an anti-pattern -- and you should not be storing information in instance variables.

Having both doGet and doPost do the same thing is violation of HTTP. Don't do it!

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with saving user information in database via "saveuser" servlet