Eclipse configures Tomcat, struts2 for Java Learning

Source: Internet
Author: User

1. Download the eclipse IDE for Java EE under Www.eclipse.org/downloads

2. Download tomcat7.0 to tomcat.apache.org

3. To http://www.eclipsetotale.com/tomcatPlugin.html download configure Tomcat to eclipse plugin

4. Download Struts2 library files to struts.apache.org

5. Create a Dynamic Web site project on Eclipse

6. Add Struts2 9 jar packages to the project properties: Commons-fileupload-1.2.2.jar, Commons-io-2.0.1.jar, Commons-lang-2.5.jar, Commons-logging-1.1.1.jar, Freemarker-2.3.16.jar, Javassist-3.11.0.ga.jar, Ognl-3.0.1.jar, Struts2-core-2.2.3.jar, Xwork-core-2.2.3.jar and copies the above 9 jar packages to lib under the Tomcat directory

7. Configure Web.xml files under the Web-inf directory

? xml version= "1.0" encoding= "UTF-8"?> <web-app id= "Webapp_9" version= "2.4" xmlns= "Http://java.sun.com/xml"
/ns/j2ee "
	xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "
	xsi:schemalocation=" http:// JAVA.SUN.COM/XML/NS/J2EE http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
	<filter>
		< Filter-name>struts2</filter-name>
		<filter-class> Org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>struts2</filter-name>
		<url-pattern>/*</ url-pattern>
	</filter-mapping>
</web-app>

8. Configure the Struts.xml file below the SRC directory

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.