• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sample struts helloworld not working on eclipse

 
sasank manohar
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • 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.
 
Shashank Ag
Ranch Hand
Posts: 88
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic