This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes <html:select> default selected  value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<html:select> default selected  value" Watch "<html:select> default selected  value" New topic

<html:select> default selected value

Siva Arun

Joined: Feb 23, 2010
Posts: 28

As of now, while submitting the this page, the results will be produced at the bottom of this page itself. But, the selected value is reset to the "Select Company" I just want to set the same while as user selected. Could you please advise?

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan.
in Mkumar

Joined: Sep 08, 2008
Posts: 20
change the properties of the company from the selected value in the action class, will resolved this issue.


Karthik Jayachandran
Ranch Hand

Joined: Feb 18, 2009
Posts: 88

Hi, make sure you are not calling actionForm.reset() method in the Action class.
I agree. Here's the link:
subject: <html:select> default selected value
Similar Threads
How to select a value in the drop down list with value getting from database?
Tooltip on html:select
Problem with dropdown list
Help me with Struts HTML tags
Using SELECTED in an html:option tag