I am trying to evaluate Struts for a client and have tried to build an
example from the basic struts-blank.war.I am clearly making a stupid
error but cannot find anything similar in the mailing archives so would
appreciate help for a newbie.
My first jsp (TopLevel.jsp) contains the following:
<html:form action="TopLevelDone.do">
Menu: <html:select property="menu">
<html:option value="AC">Add Calendar</html:option>
<html:option value="AH">Add Holiday</html:option>
<html:option value="RC">Remove Calendar</html:option>
<html:option value="RH">Remove Holiday</html:option>
<html:option value="LC">List Calendars</html:option>
<html:option value="LH">List Holidays</html:option>
<html:option value="HD">Holiday Dates</html:option>
</html:select><br>
<html:submit value="Enter"/>
</html:form>
My struts-config.xml contains the following
<action path="/TopLevelDone"
type="actions.TopLevelAction"
name="TopLevelForm"
scope="request"
input="/TopLevel.jsp">
<forward name="addCalendar" path="/AddCalendar.jsp"/>
<forward name="failure" path="/TopLevel.jsp"/>
</action>
I have a TopLevelAction.class in the actions package that just pulls in
the value of menu and redirects according to its value.
When I run the jsp and enter a value I get redirected back to index.jsp
with '?menu=AC&submit=Enter' appended.
If I change the action attribute in html:form to rubbish it says it
can't find the action so it must be getting that far. There are no error
messages in the logs I can access (running it on Sun Reference
Implementation J2EE 1.3.1).
--
Geoff Seel Voice: +44 (0)20-8296-0684
Financial Object Toolkits Ltd. Mobile: 0797-688-0668
54, Berrylands Road, Fax: +44 (0)870-054-7931
Surbiton, e-mail: [EMAIL PROTECTED]
Surrey KT5 8PD WWW: www.foto.co.uk
United Kingdom
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>