Recently engaged in a own blog system to play, using the STRUTS2 framework, the results found two major problems:
1. Unable to Export the war file;
2. Generate the war, put it into Tomcat's WebApps directory, http://localhost:8080/project name/-----> 404
The investigation revealed that the original project was developed by MyEclipse, and later I used the Eclipse Import project, so the error
Workaround:
1. under Eclipse, right-click Project Properties, projects FAC e TS
Select the Dynamic Web module to select a later version of 2.5 (running environment is TOMCAT6, if 3.0 is selected, the runtime environment is TOMCAT7)
and select Java
2. If the project does not run properly when publishing click Modify
Find Project Path
For example, my project is in the D-Disk folder product Directory
D:\Product\.settings\org.eclipse.wst.common.component
There's a sentence inside.
<wb-resource deploy-path= "/" source-path= "/webcontent"/>
Change the back webcontent to
<wb-resource deploy-path= "/" source-path= "/webroot"/>
If not, create a new Eclipse Web project. Then you copy and paste the settings. Classpath. Project into the past.
Modify the project name inside the. Project and reset the bulidpath->libraies and source
Struts2 of the sinkhole project after configuration 404 (MyEclipse to eclipse)