I have one JSP page in which I have one combo box containing search criteria and one text box containing the search value. When search is performed by clicking some button , the control passes to action which again comes back to the same JSP page. I want the search criteria that I had chosen to be shown as the first one in the combo, but it shows diff one. Within action i have tried to set the value on the form such that form.setXXXXX(search criteria ) but it does not seem to work.
Make sure your jsp's select tags are the struts version.
What you described should work. Post some code if you're still having probs.
In fact, you should not even need to do setXXX from the Action because struts will reuse the same ActionForm; this is true even if ActionForm is in request scope because your submission/redisplay occurs in a single request.
A good workman is known by his tools.
Joined: May 29, 2002
Hi, Thanks for reply. Below is the code snippet. html:select property="selectedValue" value="Select to search" name="getAllInstancesForm" html ption value="Installation Key" html ption value="Instance Key" html ption value="Host Name" html ption value="Service Name" html ption value="Version" html ption value="Status" html:select