struts.xml的编辑
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> <struts> <!-- 修改默认配置 --> <constant name="Struts.action.extension" value="action,do,,"></constant> <!-- 运行调用静态方法和静态属性 --> <constant name="struts.ognl.allowStaticMethodAccess" value="true"></constant> <!-- package 对功能模块分组管理 --> <package name="index" extends="struts-default"> <action name="testform" class="action.TestFormAction"> <result>view.jsp</result> </action> </package> </struts>