GeeCON Prague 2014*
The moose likes Servlets and the fly likes store data in table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "store data in table" Watch "store data in table" New topic
Author

store data in table

rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
I am using java in my project .In starting a registration form is filled and after clicking on submit button data is stored in database.I want to store all the information in the table in next page filled in registration form of all the users .....
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
What is the issue. You want to store or show information of all users on next page?
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
Piyush Mangal wrote:What is the issue. You want to store or show information of all users on next page?


show the information of all the registration form filled by users in the next page that is all the previous and the current one should be displayed in the next page after filling the form.
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
Get the data for all users from database and show it on screen. What is the problem. Are you asking how to retrieve data from database and show it on your jsp?
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
Piyush Mangal wrote:Get the data for all users from database and show it on screen. What is the problem. Are you asking how to retrieve data from database and show it on your jsp?


no i am not asking this.....i want store these simultaneously in database and table in the next page.......
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
If I understand correctly, you are asking how to take user to next page after submitting a form where submit stores the information from previous page and show a new page with information for all users.

If this is the case, then when you submit , you can call a servlet. Servlet's doPost method will insert the data in database and dispatch a request to another servlet which will fetch details for next page.


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61314
    
  66

Piyush Mangal is giving you good information, describing the PRG pattern. You can read more about it in this article.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
kevin yoo
Greenhorn

Joined: Apr 12, 2012
Posts: 1
Do you want to store data automatically??
rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
kevin yoo wrote:Do you want to store data automatically??


yes i want to store automatically......
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 532

rakhi sinha wrote:
kevin yoo wrote:Do you want to store data automatically??


yes i want to store automatically......

What do you mean by automatically.. ?
How can you show the details of all the users(which are in database), without getting from database, Is their any automatic way? piyush as already explained you clearly what to do for this..
 
GeeCON Prague 2014
 
subject: store data in table