Build a struts2 environment with eclipse

Source: Internet
Author: User

One, download struts2 corresponding jar package, (http://struts.apache.org/download.cgi#struts2514.1), I generally download struts2.3 version of the

Second, open eclipse new dynamic Web Project

Third, the resulting project folder is as follows

Iv. configuration of various documents (Web.xml/struts.xml)

1. Configure the Web. xml file (the automatically generated file at the beginning of the project at webcontent/ Web-inf path) Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

The Struts.xml file created under the SRC directory of Java resourses can also be copied directly from Struts.xml under Struts1\apps\struts2-blank\web-inf\classes.

Six, write Java class

Seven, write HTML page (do not like to write Jsp,java syntax and HTML code are mixed together, front and rear separation is the right path, personal view)

Eight, start the project, see the actual effect

Build a struts2 environment with eclipse

Related Article

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.