• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to hanfle error code 404

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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.

<error-page>
<error-code>404</error-code>
<location>/error.jsp</location>
</error-page>


Can any one handle this before with Sruts and Tiles?

Thanks
Sudhakar
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic