2017-03-17 10 views
1

struts.propertiesファイル内の任意のStruts定数もstruts.xmlに指定できますか?代わりにstruts.xmlに任意のstrutsプロパティを指定できますか?

struts.ognl.logMissingProperties=true 
struts.el.throwExceptionOnFailure=false 

は、代わりに次のようにstruts.xmlで指定する:これは、環境変数たとえば、プロパティで次の定数を提出でき

で値を設定するために私達を可能にするでしょうか?

<constant name="struts.ognl.logMissingProperties" value="${env.logmissing}"/> 
<constant name="struts.el.throwExceptionOnFailure" value="${env.throwExc}"/> 

答えて

0

struts.propertiesで構成プロパティはstruts.xmlで指定することができます。 struts.xmlがない場合、最初のファイルを使用してグローバルプロパティを変更できます。

のでstruts.propertiesファイルからプロパティがstruts.xmlで次のようになります。

<constant name="struts.ognl.logMissingProperties" value="true"/> 
<constant name="struts.el.throwExceptionOnFailure" value="false"/> 
関連する問題