struts.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="包的名字" extends="struts-default"> <!-- 配置全局跳转视图 --> <global-results> <result name="success">/index.jsp</result> </global-results> <!-- 普通action配置--> <action name="action的名字,访问时填入这个名字" class="action的路径.类名" method="execute"> <result name="input">/error.jsp</result> </action> </package> </struts>
时间: 2024-10-13 05:04:13