Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

Source: Internet
Author: User

1. Create a project first
2. Create a JSP in Webroot, called index.jsp, to write a sentence inside

<body>    Hello struts2 <br>  </body>

3. Writing code in the background

public class T {Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter f;}

4. Write in Struts.xml

<constant name= "Struts.devmode" value= "true"/> <package name= "Default" namespace= "/" extends= " Struts-default ">                <action name=" hell ">            <result>                /hello.jsp            </result>        </action>    </package>

5. Writing in Web. xml

<filter>        <filter-name>struts2</filter-name>        <filter-class> Org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter</filter-class>    </filter>

Attention:

<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>

This sentence is very important oh, can be said to play a decisive role, do not forget OH

Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

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.