Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Hello World for Struts 2 application not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Hello World for Struts 2 application not working" Watch "Hello World for Struts 2 application not working" New topic
Author

Hello World for Struts 2 application not working

Meles Kibrom
Greenhorn

Joined: Dec 01, 2010
Posts: 9
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

Joined: Oct 29, 2001
Posts: 8908
    
    8

"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?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Meles Kibrom
Greenhorn

Joined: Dec 01, 2010
Posts: 9
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

Joined: Oct 29, 2001
Posts: 8908
    
    8

Looks like you are missing a dependency:

What do you have in your WEB-INF/lib directory?
Meles Kibrom
Greenhorn

Joined: Dec 01, 2010
Posts: 9
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

Joined: Mar 30, 2010
Posts: 350
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

Joined: Jul 05, 2009
Posts: 118

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.

Regards, Atul.
I came to this world on a Learner's License
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8908
    
    8

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

Joined: Dec 01, 2010
Posts: 9
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

Joined: Oct 29, 2001
Posts: 8908
    
    8

 
Consider Paul's rocket mass heater.
 
subject: Hello World for Struts 2 application not working