Struts_default.properties檔案注釋

來源:互聯網
上載者:User
指定web應用的預設編碼集,可為GBK/GB2312struts.i18n.encoding=UTF-8指定Struts2架構預設載入的設定檔Struts..configuration.files=struts-default.xml,struts.xml,strtus-plugin.xml指定Struts2應用載入使用者自訂的屬性檔案,不覆蓋 struts.properties中的屬性struts.custom.properties=application,org/apache/struts2/extension/custom指定需要Strtus2處理的請求尾碼,eg:*.do 或 *.action 或 *struts.action.extension=action,設定Struts2是否使用開發模式,開發時可設定為true,應用出錯時顯示更多、更友好的出錯資訊,便於調錯;發布階段設為false。### includes:若為true,以下兩個屬性也為true(2.3以後)### - struts.i18n.reload = true### - struts.configuration.xml.reload = truestruts.devMode=false設定是否每次HTTP請求到達時,系統都重新載入資源檔struts.i18n.reload=false設定是否每次HTTP請求到達時,系統都重新載入設定檔struts.configuration.xml.reload=false### Struts2 default.properties  or struts.properties該屬性指定載入Struts2設定檔的設定檔管理員struts.configuration=org.apache.struts2.config.DefaultConfiguration指定web應用的預設Locale# struts.locale=en_US指定Struts2預設的ObjectFactoryBean,預設為spring# struts.objectFactory = spring指定Spring架構的自動裝配模式,預設根據Bean的name屬性自動裝配struts.objectFactory.spring.autoWire = name/type/auto/constructor該屬性指定整合Spring架構時,是否緩衝Bean執行個體,預設turestruts.objectFactory.spring.useClassCache = true/false### ensures the autowire strategy is always respected.### valid values are: true, false (false is the default)struts.objectFactory.spring.autoWire.alwaysRespect = false指定Struts2的類型檢測機制,通常支援tiger和notiger兩個屬性值#struts.objectTypeDeterminer = tiger#struts.objectTypeDeterminer = notiger指定處理multipart/form-data的MIME類型(檔案上傳請求的架構)# struts.multipart.parser=cos -->cos檔案上傳架構# struts.multipart.parser=pell -->pell上傳struts.multipart.parser=jakarta -->common-fileupload檔案上傳架構,預設jakarta指定檔案上傳的臨時儲存路徑,預設:javax.servlet.context.tempdirstruts.multipart.saveDir=指定檔案最大上傳位元組數,預設:2Mstruts.multipart.maxSize=2097152指定將HTTP請求映射到指定Action的映射器#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper是否通過JAR檔案提供靜態內容伺服器,預設:truestruts.serve.static=true設定瀏覽器是否緩衝靜態內容,開發階段可設定為falsestruts.serve.static.browserCache=true設定Strtus2是否支援動態方法引動過程struts.enable.DynamicMethodInvocation = true設定能否在Action name屬性中使用/,預設false### <action name="*/*" method="{2}" class="actions.{1}"> to match "/foo/edit" or "/foo/save".struts.enable.SlashesInActionNames = false指定是否允許在Struts2標籤中使用運算式文法,預設truestruts.tag.altSyntax=true指定視表徵圖簽預設的視圖主題,預設xhtmlstruts.ui.theme=xhtml/archive.ajax/archive.simple/archive.xhtml/css_xhtml/simple指定視圖檔案所需模版的位置,預設載入template路徑下的模版檔案struts.ui.templateDir=template指定模版檔案的尾碼struts.ui.templateSuffix=ftl  -->FreeMarker                              vm   -->Velocity   jsp  -->jsp模版指定velocity架構所需的velocity.properties檔案的位置struts.velocity.configfile = velocity.properties指定velocity架構的Context位置,多個Context用,隔開struts.velocity.contexts =指定velocity架構的toolbox位置struts.velocity.toolboxlocation=指定Web應用所在的監聽連接埠struts.url.http.port = 80指定Web應用的Data Encryption Service連接埠struts.url.https.port = 443指定Struts2產生URL時是否包含請求參數struts.url.includeParams = none -->不包含                           get -->僅包含get請求類型的提交                           all -->包含全部指定Struts2所需的國際化資源檔,多個用,隔開# struts.custom.i18n.resources=testmessages,testmessages2由於某些Java EE伺服器(WebLogic,Orion,OC4J),不支援HttpServletRequst調用getParameterMap()方法,此時可設定該屬性值為true來解決問題struts.dispatcher.parametersWorkaround = false指定Strtus2使用的FreeMarker管理器,預設為Strtus2內建的FreeMarker管理器#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager是否隱藏FreeMarkder模版struts.freemarker.templatesCache=false### Enables caching of models on the BeanWrapperstruts.freemarker.beanwrapperCache=false### See the StrutsBeanWrapper javadocs for more informationstruts.freemarker.wrapper.altMap=true### maxStrongSize for MruCacheStorage for freemarkerstruts.freemarker.mru.max.strong.size=100指定XSLT Result 是否使用樣式表緩衝struts.xslt.nocache=false### Whether to always select the namespace to be everything before the last slash or notstruts.mapper.alwaysSelectFullNamespace=false### Whether to allow static method access in OGNL expressions or notstruts.ognl.allowStaticMethodAccess=false### Whether to throw a RuntimeException when a property is not found### in an expression, or when the expression evaluation failsstruts.el.throwExceptionOnFailure=false### Logs as Warnings properties that are not found (very verbose)struts.ognl.logMissingProperties=false### Caches parsed OGNL expressions, but can lead to memory leaks### if the application generates a lot of different expressionsstruts.ognl.enableExpressionCache=true

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.