• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hello World for Struts 2 application not working

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Meles Kibrom,
check this link https://coderanch.com/t/507224/Struts/unable-run-sample-application-Struts..hope this is helpful..
 
Ranch Hand
Posts: 119
Oracle Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic