aspose file tools*
The moose likes Struts and the fly likes Getting 404 error while running Struts application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting 404 error while running Struts application" Watch "Getting 404 error while running Struts application" New topic
Author

Getting 404 error while running Struts application

Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Hi All,

I am new to Struts2 and creating sample application given in the Black Book. When i run the application i am getting "HTTP Status 404" and description says that "The Request resource is not available."


Below is the log from Server.
Also let me know if you need specific code.

Thanks in Advance.


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The web.xml causing the error would be useful.
Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Thank David for reply.

Below is the web.xml.

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Do you have a properly indented one without the extra characters?
Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Hi David,

I removed the initial hyphen and made it indented it. But now i am getting below exception.




It does not have HelloAction.class file but i think IDE should automatically create it when i deploy an application

If my understanding is wrong then could you let me know how to compline that class separately as it contains other inbuild packages (e.g. com.opensymphony.xwork2.Action).

Thanks in Advance.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

There shouldn't be *any* hyphens.

If you're having an IDE issue then post a message in the IDE forum. I don't know if you have the package right, because I can't see your code. I don't know if your Eclipse is set up to compile and deploy properly.
 
 
subject: Getting 404 error while running Struts application