Editing struts-config.xml
If your publication does not already have a
struts-config.xml
file in the
WEB-INF
folder, then create one and add the
following content to it:
<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <form-beans> <form-bean name="pollForm" type="com.escenic.poll.struts.SubmitForm" /> </form-beans> <action-mappings> <action path="/poll/vote" type="com.escenic.poll.struts.HandleSubmitAction" name="pollForm" scope="request" > <forward name="success" path="success.jsp" redirect="true" /> <forward name="error" path="error.jsp" redirect="true" /> </action> </action-mappings> </struts-config>
If the WEB-INF
folder
does already contain a
struts-config.xml
file, then add the highlighted
sections of the above content to it, in the appropriate locations.
Insert the form-bean
element as a child of the
existing form-beans
element, and insert the
action
element as a child of the existing
action-mappings
element.