• Post Reply Bookmark Topic Watch Topic
  • New Topic

is there anything like formpost in jsp?  RSS feed

 
anuja Edathu
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an jsp page with 3 textboxes and 2 listboxes.on clicking the first listbox the form is been submitted and is returned to the same jsp page with the values that has to be displayed in the second listbox.The problem that i face is when the page is loaded the second time the values which are there in the 3 textboxes get vanished...
Can any one help me to find a solution for it..
i want the values of the text box to be there when the jsp page is loaded the second time.
 
Shilpa Asuthkar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i have understood ur problem.......
when u submit the form and u come back to the same page then the already existing values for the 3 textboxes will also be passed to that page as parameters u can use request.getParameter
i am showing only a single text box as an example............


<html>
<body>
<form name="myform" action="temp1.jsp">
<input type="text" name="t1" value='<%=request.getParameter("t1") %>' >
<input type="submit" value="submit">

</form>
</body>
</html>

check out
on submit the value remains.....
 
pankaj patil
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

Either you have to use request.getParameter of each value or use have to set the value of each in the Bean and get the value from the bean in the page when the page loaded second time


Warm Regards
Pankaj
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!