Struts2 configuration file example

Source: Internet
Author: User

<? 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>
<! -- Encoding method of Request Parameters -->
<Constant name = "struts. i18n. encoding" value = "UTF-8"/>
< ! -- Specify the request suffix type processed by struts2. Separated by commas -->
<Constant name = "struts. Action. Extension" value = "action, do, go, xkk"/>
< ! -- Whether to reload the Struts. xml file after it is modified. The default value is false (used in the production environment). It is best to enable it in the development stage -->
<Constant name = "struts. configuration. xml. Reload" value = "true"/>
<! -- Whether to use the struts development mode. The development mode has more debugging information. The default value is false (used in the production environment). It is best to enable it in the development stage -->
<Constant name = "struts. devmode" value = "false"/>
<! -- Sets whether the browser caches static content. The default value is true (used in the production environment). It is best to disable it in the development stage -->
<Constant name = "struts. Serve. Static. browsercache" value = "false"/>

<! -- Whether static methods can be called in ognl expressions. The default value is false. -->
<Constant name = "struts. ognl. allowstaticmethodaccess" value = "true"/>

<! -- Specify that spring is responsible for creating action objects.
<Constant name = "struts. objectfactory" value = "Spring"/>
-->
<! -- Whether to enable dynamic method call -->
<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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.