struts2.06开发流程

1.加入相关的包

       commons-logging-1.1.jar

       freemarker-2.3.8.jar

       ognl-2.6.11.jar

       struts2-core-2.0.6.jar

       xwork-2.0.1.jar

2.配置struts.properties文件:

       struts.configuration.xml.reload=true

       struts.objectFactory=spring

       struts.objectFactory.spring.autoWire=name

       struts.custom.i18n.resources=fses

       struts.configuration.xml.reload=true

3.配置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>

              <constant name="struts.objectFactory" value="spring"/>

              <include file="struts-stuAction.xml"/>

           <package name="user" extends="struts-default" namespace="/">

           </package>

</struts>

你可能感兴趣的:(apache,spring,xml,freemarker,struts)