• 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

sample struts helloworld not working on eclipse

 
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written a sample app and trying to deploy and run with the help of build.xml . I could see the project in tomcat homepage but in stop mode. when i type url for my project like http://localhost:8080/Sample/ , the browser says resource not found. I'm unable get where i am going wrong.

web.xml




//struts.xml



//index.jsp



//HelloWorld.java



//success.jsp



//build.xml




I should tell you that i don't have much knowledge about build.xml but it's cleaning thing for me and starting the server. I just picked up the code from somewhere and name as "Sample" in <project> tag and rest of the occurrences.

i am using windows server 2008 os . Also i am manually deleting the Sample.jar file in "tomcatHome/webapps" as my build file is not removing it with clean command . Thanks.
 
Ranch Hand
Posts: 88
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello World sample is provided within Struts download archive. Go through that instead.
Also for good tutorials visit roseindia.net
 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


thanks shashank. webpage
I am getting the the above error in the console. also i just added namespace attribute like this but it didnot work

i am using commons-fileupload, commons-io jars in addition to that mentioned in the link.
 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
finally it works for me and for those who might step in here sometime, i will tell how it worked.

1. i removed ognl-3.0.jar,struts2-core-2.2.1.1.jar,xwork-core-2.2.1.1.jar and added ognl-2.6.11.jar,
struts2-core-2.0.11.jar,xwork-2.0.4.jar
2.kept index.jsp outside of WEB-INF and "in" the parent directory of WEB-INF

so it is basically version compatibility of jars and right directory structure . i didnot use commons-fileupload and commons-io jars for this simple example.

 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic