Eclipse Builds STRUTS2 Environment

Source: Internet
Author: User

Eclipse builds Struts2 environment

1. Create a Dynamic Web project. Dynamic.

2, copy the jar package.

Unzip the empty application in the Struts-2.3.20/apps.

Put the jar bag inside the Web-inf/lib

Into the lib of Eclipse.

After you copy it in:

3. Modify the Web. xml file

Default: (Note the previous version created in 1, 3.1, so this must also be 3.1)

Enter the app Struts2-blank inside, need the Web. XML inside the

Copy these into the Eclipse Project's Web. XML, before the <welcome-file-list> can not.

After the modification is complete:

4. Copy struts.xml configuration file:

Enter the web-inf/classes inside the apps empty app. You can see the Struts.xml file.

Copy it to SRC in the Eclipse project:

Struts.xml content is as follows:

To remove the temporary useless, change to the following form:

5. Create a JSP file:

Create a JSP file.

6. Operation:

Right-click hello.jspand select Run Onserver inside Run as.

Tomcat starts normally:

Inline browser browsing, content is displayed properly.

The results of the Firefox browser run are as follows:

At this point, a simple Struts2 environment is built.

Eclipse Builds STRUTS2 Environment

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.