This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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

Win a copy of Building Microservices this week in the Design forum!
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 / 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="" target="_blank" rel="nofollow"></a>
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: How to hanfle error code 404
It's not a secret anymore!