File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes selected value passing to Serrvlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "selected value passing to Serrvlet" Watch "selected value passing to Serrvlet" New topic
Author

selected value passing to Serrvlet

Shiwani Aggarwal
Greenhorn

Joined: Aug 21, 2003
Posts: 22
Could you let me know how to pass selected value from a combo box to servlet and then when jsp is agian displayed how to retain valuues user would have entered.
I have a jsp, where user need to enter some fields, like txt fields, combo, radio...when he clicke submit I need to get selected values in servlet..I am unable to get the value of combo field and date. Secondly after submit is clicked all these values should be reatined on the page but all goes off obviously. How do we do that?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60783
    
  65

If you are forwarding to the JSP from the servlet to which your form was submitted all of the request parameters are still on the request and available to the JSP. You can use these values to set the value and select attributes of the various form fields accordingly.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: selected value passing to Serrvlet
 
Similar Threads
how do get selected value from combobox in html
Struts combo box
form values lost in request scope
problem when the jsp get refreshed
Persisting information