File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes sample struts helloworld not working on eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "sample struts helloworld not working on eclipse" Watch "sample struts helloworld not working on eclipse" New topic
Author

sample struts helloworld not working on eclipse

sasank manohar
Ranch Hand

Joined: Feb 14, 2008
Posts: 186
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

Joined: Dec 22, 2009
Posts: 88

Hello World sample is provided within Struts download archive. Go through that instead.
Also for good tutorials visit roseindia.net


SCJP 91%, SCWCD 97%
sasank manohar
Ranch Hand

Joined: Feb 14, 2008
Posts: 186


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

Joined: Feb 14, 2008
Posts: 186
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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sample struts helloworld not working on eclipse
 
Similar Threads
Building Seam projects in Eclipse
War file created by Ant is not working with an exception cannot find global ActionForward for name *
What does ${user.home} means ? Where is build .properties ?
Ant - Directory not created
Problem in building project using Ant build tool