This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have 2 JSP pages each with a dates drop down combo box whose contents are the same. However, on the first page the user can set a default date that s/he can use throughout the application.
So on the second JSP page in the drop down combo box, I'd like to set the selected default date (from the first page) as the first/selected value in the drop down but at the same time the user should be able to select a different date from the list.
Place this default date into the ActionForm before entering the jsp. You probably need to use a SetupAction for this. The other option would be to set the default value into the date field within the ActionForm's reset method.
When this value is in the ActionForm Struts will automatically select the corresponding value(s) in the jsp.