Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

partial-submit a form in servlet and show parameter values in the same page as form

 
avantika ghosh
Greenhorn
Posts: 1
Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a form in jsp page(index.jsp) with simple form elements and css. But I want to partially-submit this form to a servlet and then want to output entered values on the same jsp page(index.jsp) as the form. Is there any way to do this without having a submit button?
How can I make sure that the entered values remains same even after I redirect servlet to jsp page after processing?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65338
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way would be to re-route the form submission to an Ajax request rather then a full-page refresh. That way, the original page stays displayed and you don't have to worry about re-creating it with original values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic