This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2 Annotations example giving HTTP 404 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 Annotations example giving HTTP 404 error" Watch "Struts2 Annotations example giving HTTP 404 error" New topic
Author

Struts2 Annotations example giving HTTP 404 error

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Hi guys,

Using Struts2 with annotations, I have set up a very simplistic webapp which starts up and I can manually go directly to a JSP (so I know it's working in a basic form)

But when I create a simple Struts2 Action using annotations like the one below

And go to the URLs:


I get the following error:



But if I just go to a URL like


It works (finds the page).

Could anyone explain this?

Ref: http://www.mkyong.com/struts2/struts-2-hello-world-annotation-example/
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts2 Annotations example giving HTTP 404 error