Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Message to show database update

 
Anjali Ajwani
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a form in a JSP page which accepts several fields from the user. After entering these fields the user can select either "Add this vendor" or "Add Location for this vendor". If "Add this Vendor" is selected, the controller servlet will insert all these fields into the database.
Once the values are inserted in the database(executeUpdate() is done), the user should see a message saying "Insert successful" and also come back to this first JSP, so that he can enter "Location" now. How do I achieve this?
 
Sam Dalton
Author
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have your servlet redirect (via the requestdispatcher) to the success (or failure) page. The page can have a meta tag that forwards onto the first JSP page after a predefined period of time.
S
 
Anjali Ajwani
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The first part(requestdispatcher), I had done yesterday. How do I do the second one....sending the control to JSP after lapse of some seconds? Which package can I find this in?
Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic