Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 application using eclispe and tomcat 7

 
Adbhut Singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Attaching Snapshoot of jar file and struts jar

 
Adbhut Singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jar file in class path


 
m pa
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 94
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic