• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Http 404 error, cannot find Action class

 
Sujoy Mukherjee
Ranch Hand
Posts: 51
Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 94
Eclipse IDE Hibernate Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sujoy Mukherjee
Ranch Hand
Posts: 51
Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Yogesh...you are absolutely correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic