This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Struts 2 application using eclispe and tomcat 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 application using eclispe and tomcat 7" Watch "Struts 2 application using eclispe and tomcat 7" New topic
Author

Struts 2 application using eclispe and tomcat 7

Adbhut Singh
Greenhorn

Joined: Apr 10, 2012
Posts: 5
I am trying to develop simple web application using struts 2 and eclipse. I am getting below error




Struts.xml



web.xml






When I run the index.jsp then I get resource not found error.

but when I run the application after removing the filter mapping from the web.xml. then index.jsp run fine.

Please help. Thanks in advance
Adbhut Singh
Greenhorn

Joined: Apr 10, 2012
Posts: 5
Attaching Snapshoot of jar file and struts jar

Adbhut Singh
Greenhorn

Joined: Apr 10, 2012
Posts: 5
Jar file in class path


m pa
Greenhorn

Joined: Apr 17, 2013
Posts: 17
I feel your pain. It took me a while to set up a struts 2 project in eclipse Juno, the main problem being that there is no definitive list of what jars to use. I haven't got time to study the .xml files but list the jars I am using in my project which also has tiles 2 and it took me a while to get the jars so it all works. (I am not sure the 3 asm jars are needed but if it is working, I have left them in).

asm-3.3.jar
asm-commons-3.3.jar
asm-tree-3.3.jar
commons-beanutils-1.8.0.jar
commons-collections-3.1.jar
commons-digester-2.0.jar
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
commons-lang3-3.1.jar
commons-logging-1.1.1.jar
freemarker-2.3.19.jar
javassist-3.11.0.GA.jar
log4j-1.2.14.jar
ognl-3.0.5.jar
servlet-api-2.5.jar
struts2-core-2.3.12.jar
struts2-tiles-plugin-2.3.12.jar
tiles-api-2.0.6.jar
tiles-core-2.0.6.jar
tiles-jsp-2.0.6.jar
velocity-1.6.4.jar
velocity-tools-1.4.jar
xwork-core-2.3.12.jar

sorry - just spotted the last line about the mapping so it probably is jar incompatibility issue.
Balaji Vankadaru
Ranch Hand

Joined: May 31, 2013
Posts: 47
As per your stack trace you have included two struts2 core versions . Remove 2.0.1 version of your struts core to get it worked.
Yogesh Lonkar
Ranch Hand

Joined: Jul 17, 2012
Posts: 94

It is best if you use "struts2-blank.war" to start your new project as it contains all basic jar files with proper compatible version. "struts2-blank.war" is provided by apache with Full distribution and Example Applications. this way many initial difficulties involving mismatch of libraries can be avoided.


Learning some thing New Every Day
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts 2 application using eclispe and tomcat 7