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 Http 404 error, cannot find Action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Http 404 error, cannot find Action class" Watch "Http 404 error, cannot find Action class" New topic
Author

Http 404 error, cannot find Action class

Sujoy Mukherjee
Ranch Hand

Joined: Dec 31, 2005
Posts: 46

Hello friends,
I am trying to run a very basic struts2 application with eclipse and tomcat 7. I am new to eclipse world..previously I was using netbeans.
But it is showing 404 error code.

here is the brief view of my project structure:

Struts2Starter(application name)
|
|__.settings
|__build
|__src
| |_org
| |_sujoy
| |_action
| |__TutorialAction.java
|
|__web
|_success.jsp
|_error.jsp


here is struts.xml


Here is TutorialAction.java


success.jsp


error.jsp



web.xml



And after running tomcat and manually typing getTutorial.action at the end of the url(the url here is: http://localhost:8080/Struts2Starter/getTutorial.action)
it is showing http 404 error.

Where did I do wrong? Please help.
Yogesh Lonkar
Ranch Hand

Joined: Jul 17, 2012
Posts: 94

I think your directory structure should be


Struts2Starter(application name)
|
|__.settings
|__build
|__src
| |_org
| |_sujoy //this should be inside org
| |_action //this should be inside sujoy
| |_TutorialAction.java //this should be inside action


Learning some thing New Every Day
Sujoy Mukherjee
Ranch Hand

Joined: Dec 31, 2005
Posts: 46

Yes Yogesh...you are absolutely correct.
 
wood burning stoves
 
subject: Http 404 error, cannot find Action class