• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

custom error page

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have made a Customised error page and want to display that when an error occurs. The entry of the same has been done in web.xml(Jboss). Although it prints the System.out.println statement on Console, written on that error page but does not make the HTML page to show on Browser. Also I have to acheive this without adding <@errorPage ...> tag in each and every JSP ...Is it possible ....
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the error-page directive from your web.xml file?
 
san
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/WEB-INF/web/jsp/common/error.jsp</location>
</error-page>

this is error page directive in my web.xml
kind regards
sandesh
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just tried using a jsp under WEB-INF on Tomcat and it didn't work.
Try moving your error page out of WEB-INF.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure why this is. I looked at the headers with a packet sniffer and it's not trying to re-direct to the error page. With forwards, it shouldn't matter if the jsp is under WEB-INF.
 
san
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
have tried with JSP out of web-inf but still not working
also I am using struts so is there any facility in struts 1.0 to handle exception (in strut-sconfig.xml)

Thanks
Sandesh
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you looked into <global-exceptions> or <exception> element in struts-config.xml?
 
san
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using Struts 1.0 so how do I manage Exception in struts-config.xml
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As this has become Struts-specific, moving to the Struts forum.
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic