Struts2 integrated convention plug-in

Source: Internet
Author: User


Struts2 integrated struts2-convention-plugin-2.1.8.1.jar plug-in for Zero Configuration
 
<? Xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE struts PUBLIC "-// Apache Software Foundation // DTD Struts Configuration 2.1 // EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<Struts>
<Constant name = "struts. il8n. encoding" value = "UTF-8"> </constant>
 


<Constant name = "struts. ui. theme" value = "simple"/>
<! -- Define the default access suffix -->
<Constant name = "struts. action. extension" value = "action"/>
<! -- Set the page storage path of convention-plugin -->
<Constant name = "struts. convention. result. path" value = "/WEB-INF/jsp"/>
<! -- Set the search path of convention-plugin -->
<Constant name = "struts. convention. package. locators" value = "kp"/>
<! -- Set the path that convention-plugin does not search. -->
<Constant name = "struts. convention. exclude. packages" value = ""/>
<! -- Set the default parent package of convention-plugin. If yes -->
<Constant name = "struts. convention. default. parent. package" value = "base-default"/>
<! -- The purpose of my design is to use the interceptor of this package globally. It can be inherited without the convention-plugin. The purpose of this package interceptor
It is for login verification. Unless there are special requirements, for example, if you do not need to perform login verification, you can not inherit it, you can in the action class
Recompile the package with annotation, or define action under package com. test11. *, configure in struts-test.xml
-->
<Package name = "base-default" extends = "convention-default" abstract = "true">
<Interceptors>
<Interceptor name = "frameInterceptor" class = "com. intercepter. frameInterceptor"> </interceptor>

<Interceptor-stack name = "frameinterceptors">
<Interceptor-ref name = "frameInterceptor"> </interceptor-ref>
<Interceptor-ref name = "defaultStack"> </interceptor-ref>
</Interceptor-stack>
</Interceptors>
<Default-interceptor-ref name = "frameinterceptors"> </default-interceptor-ref>
</Package>
<! -- Remove the following two items in the production mode -->
<Constant name = "struts. devMode" value = "true"/>
<Constant name = "struts. convention. classes. reload" value = "true"/>
</Struts>
Author "js sliding door implementation"

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.