Setting Up A Struts2 Eclispe Project

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