You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andreas Andersson <an...@travelstart.se> on 2005/03/31 13:22:40 UTC

remove stack-trace from public web

Hi!

Is there anyway to make tomcat not print the stack trace when jsp fails?

-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: remove stack-trace from public web

Posted by Viorel Dragomir <vd...@wylog.com>.
Write stuff like this into your app's web.xml file.

<error-page>

<error-code>404</error-code>

<location>/common/notFound.html</location>

</error-page>

<error-page>

<error-code>403</error-code>

<location>/common/file.html</location>

</error-page>

<error-page>

<error-code>500</error-code>

<location>/common/error.html</location>

</error-page>



Viorel Dragomir

.
..
-------------------------------------------------------------------



----- Original Message ----- 
From: Andreas Andersson 
To: Tomcat Users List 
Sent: Thursday, March 31, 2005 13:22
Subject: remove stack-trace from public web


Hi!

Is there anyway to make tomcat not print the stack trace when jsp fails?

-- 
Andreas Andersson
IT Dept.
Travelstart Nordic
andreas@travelstart.se
http://www.travelstart.se

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

Re: remove stack-trace from public web

Posted by Antony Paul <an...@gmail.com>.
You can use an error page to display when an exception occurs. This
can be configured in web.xml.
for eg.
<error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/internalError.html</location>
</error-page>

it can be used with HTTP error status also. The following displays
invalidpage.html if a page is not found.

<error-page>
    <error-code>404</error-code>
    <location>/invalidpage.html</location>
</error-page>



On Thu, 31 Mar 2005 13:22:40 +0200, Andreas Andersson
<an...@travelstart.se> wrote:
> Hi!
> 
> Is there anyway to make tomcat not print the stack trace when jsp fails?
> 
> --
> Andreas Andersson
> IT Dept.
> Travelstart Nordic
> andreas@travelstart.se
> http://www.travelstart.se
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
rgds
Antony Paul
http://www.geocities.com/antonypaul24/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org