aspose 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
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: 61662
    
  67

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: selected value passing to Serrvlet