<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
<!-- 請求參數的編碼方式 -->
<constant name="struts.i18n.encoding" value="UTF-8"/>
<!-- 指定被struts2處理的請求尾碼類型。多個用逗號隔開 -->
<constant name="struts.action.extension" value="action,do,go,xkk"/>
<!-- 當struts.xml改動後,是否重新載入。預設值為false(生產環境下使用),開發階段最好開啟 -->
<constant name="struts.configuration.xml.reload" value="true"/>
<!-- 是否使用struts的開發模式。開發模式會有更多的調試資訊。預設值為false(生產環境下使用),開發階段最好開啟 -->
<constant name="struts.devMode" value="false"/>
<!-- 設定瀏覽器是否緩衝靜態內容。預設值為true(生產環境下使用),開發階段最好關閉 -->
<constant name="struts.serve.static.browserCache" value="false" />
<!-- 是否允許在OGNL運算式中調用靜態方法,預設值為false -->
<constant name="struts.ognl.allowStaticMethodAccess" value="true"/>
<!-- 指定由spring負責action對象的建立
<constant name="struts.objectFactory" value="spring" />
-->
<!-- 是否開啟動態方法引動過程 -->
<constant name="struts.enable.DynamicMethodInvocation" value="false"/>
<package name="my" extends="struts-default" namespace="/">
<action name="ognl" class="com.javacrazyer.web.action.OGNLAction">
<result>/ognl_info.jsp</result>
</action>
</package>
</struts>