Setting Up A Struts2 Eclispe Project
- Download Tomcat 8 and install as shown in class.
- Download Struts2.
- Start Eclipse for Java EE Developers and create a Dynamic Web project.
- Add the files hibernate.cfg.xml, global.properties, log4j.xml, and struts.xml to the /Java Resources/src directory.
- Create the directory /WebContent/WEB-INF/lib if it does not exist in your project.
- Make sure your lib directory contains similar JAR FILES , JAR files. You will also add your Hibernate and Java Mail JAR files here later.
- Replace your project's /WebContent/WEB-INF/web.xml file with this one.
- Create the directory /WebContent/WEB-INF/jsp and add the file error.jsp to it.
- Create the directory /WebContent/WEB-INF/jsp/welcome and add the files index.jsp and hello.jsp to it.
- Configure your Tomcat 8 server in Eclipse as shown in class.
- Select your Dynamic Web Project and Run it on your Tomcat 8 server.
- You can also look in your Strut2 download for sample war files, e.g. struts2-blank. Unzip and look at the files and structure