• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hello World for Struts 2 application not working

 
Meles Kibrom
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all
I am new to Struts 2 and while I am trying to deploy the HelloWorld application in the site: http://www.vaannila.com/struts-2/struts-2-example/struts-2-hello-world-example-1.html, exactly as written in my tomcat container is it saying 404: requested resource canot be found. what things am I missing. Please help I am stuck
regards
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"fish jones", please see your private messages regarding an important administrative matter.
As for your question, did you check your Tomcat logs for errors? Did you check the Tomcat administration console to see that the application deployed?
 
Meles Kibrom
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this kind of information from my Tomcat 7.0/logs file, this log is written when I start Tomcat which indicates that there is something that I have to do first but I am not sure what it is ( note also that my application's name is called teme):

 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you are missing a dependency:

What do you have in your WEB-INF/lib directory?
 
Meles Kibrom
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe
I have the following jar files in WEB-INF/lib directory:
1.commons-logging-1.0.4
2.freemarker-2.3.16
3.ognl-3.0
4.struts2-core-2.2.1.1
5.xwork-core-2.2.1.1
 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Meles Kibrom,
check this link http://www.coderanch.com/t/507224/Struts/unable-run-sample-application-Struts..hope this is helpful..
 
Atul Darne
Ranch Hand
Posts: 118
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please dont confuse between struts 2.2 and struts 2
they have some different concepts for the struts.xml configuration and the tags into it.
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Atul, am I missing something? Based on the last post in the thread she linked, madhuri looks like she's using 2.2.1. Meles looks like he's using 2.2.1.1
Meles, looking at the struts2-blank web application packaged in the Struts distribution (look in the apps directory), you should have at least the following in your WEB-INF/lib directory:

commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
freemarker-2.3.16.jar
javassist-3.7.ga.jar
ognl-3.0.jar
struts2-core-2.2.1.1.jar
xwork-core-2.2.1.1.jar
 
Meles Kibrom
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe Ess and madhuri kunchala, I have put the jar files from the struts2-blank\WEB-INF\lib based on your information and is it working fine

thank you very much
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic