<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" "http://struts.apache.org/dtds/struts-2.5.dtd"> <struts> <constant name="struts.devMode" value="true"></constant> <constant name="struts.ui.theme" value="simple"></constant> <package name="erp" extends="struts-default" > <!-- <action name="main"> <result>/WEB-INF/jsps/main.jsp</result> </action> <action name="context"> <result>/WEB-INF/jsps/context.jsp</result> </action> --> <!-- 做单独的页面跳转,不需要class。在本例中主要是用于main页面和context页面的跳转。 上面两个是单独配置--> <action name="erp_*"> <result>/WEB-INF/jsps/{1}.jsp</result> </action> <action name="emp_*" class="empAction" method="emp_{1}"> <result name="success">/WEB-INF/jsps/emp/{1}.jsp</result> </action> </package> </struts>