Using STRUTS2 in Intellij idea

Source: Internet
Author: User

It is said that there are a lot of loopholes in the struts2, but as a study I also use it, because the book is based on this said Ah.

No wonder the official website also has no struts2.2.1 version of the download.

1. Download struts2.2.1 GA version

2. Create a new Web project

3. Import the following packages into the Web/web-inf/lib directory and add the packages

4. Add the following configuration to the Web. xml file

<?xml version= "1.0" encoding= "UTF-8"?>
<web-app xmlns= "Http://xmlns.jcp.org/xml/ns/javaee"
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation= "Http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version= "3.1" >

<!--define the core of STRUTS2 filter--
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<!--let Struts2 's core filter intercept all requests--
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


</web-app>

Using STRUTS2 in Intellij idea

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.