jQuery in Action, 3rd edition
The moose likes Struts and the fly likes How to hanfle error code 404 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to hanfle error code 404" Watch "How to hanfle error code 404" New topic

How to hanfle error code 404

sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
I am using Struts with tiles. I tried utting the following code in web.cml and tryied to access a pege which is not in the web path. I thout it will redirect to the error.jsp page. But browser still shoing file not found 404 page.


Can any one handle this before with Sruts and Tiles?

alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
your path is somehow incorrect for '/error.jsp'. i'd handle it from the web.xml first. you can use struts and tiles and define an /error.do mapped to an (optional) action that forwards to a tiles def. the web.xml then can map the error code to the struts action. since 404 is at the application/server level, this cannot be done using struts alone.

-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
I agree. Here's the link: http://aspose.com/file-tools
subject: How to hanfle error code 404
It's not a secret anymore!