1. Create
2. Join
3
4
5
<Servlet>
<Servlet-name> action </servlet-name>
<Servlet-class> org. apache. struts. action. ActionServlet </servlet-class>
<Init-param>
<Param-name> config </param-name>
<Param-value>/WEB-INF/structs-config.xml </param-value>
</Init-param>
</Servlet>
<Servlet-mapping>
<Servlet-name> action </servlet-name>
<Url-pattern> *. do </url-pattern>
</Servlet-mapping>
6. Configuration
<Struts-config>
<! -- Configuration form -->
<Form-beans>
<! -- Name: form name -->
<! -- Type: Full Form path -->
<Form-bean name = "loginForm" type = "com.png. form. LoginForm"> </form-bean>
</Form-beans>
<! -- Configure action -->
<Action-mappings>
<! -- Name: associate a form -->
<! -- Type: full action path -->
<Action path = "/login" name = "loginForm" type = "com.png. action. LoginAction">
<! -- Set redirect -->
<Forward name = "succeed" path = "/jsp/succeed. jsp"> </forward>
<Forward name = "failure" path = "/jsp/failure. jsp"> </forward>
</Action>
</Action-mappings>