Discussion:
403 Forbidden
Søren Blidorf
2005-01-19 23:08:15 UTC
Permalink
Hi.

I have setup my web.xml error page "403 Forbidden" to go to my page
"restrictedError.jsp"

I cannot get it to work!

Can it be because I use a danish browser where the error code is "403
Forbudt"

BR

Soren
Wendy Smoak
2005-01-20 01:59:57 UTC
Permalink
From: "Søren Blidorf" <***@nolas.dk>
To: <tomcat-***@jakarta.apache.org>
Sent: Wednesday, January 19, 2005 4:08 PM
Subject: 403 Forbidden
Post by Søren Blidorf
I have setup my web.xml error page "403 Forbidden" to go to my page
"restrictedError.jsp"
I cannot get it to work!
What have you tried? I'm having a similar problem, though I'm trying to
trap certain types of Exceptions (rather than error codes) and send the user
to a certain .jsp.

Post the relevant parts of [I assume] web.xml and hopefully someone can help
us both. :)
--
Wendy Smoak
Søren Blidorf
2005-01-20 07:29:46 UTC
Permalink
This is the error page part of my web.xml:

<error-code>500</error-code>
<location>/internalError.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/notFoundError.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/restrictedError.jsp</location>
</error-page>
<error-page>
<error-code>400</error-code>
<location>/public/jada.jsp</location>
</error-page>
<error-page>
<exception-type>SendFailedException</exception-type>
<location>/mailError.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.NullPointerException</exception-type>
<location>/NullPointerException.jsp</location>
</error-page>
<error-page>
<exception-type>java.net.UnknownHostException</exception-type>
<location>/mailError.jsp</location>
</error-page>
<error-page>
<exception-type>org.apache.jasper.JasperException</exception-type>
<location>/internalError.jsp</location>
</error-page>

-----Oprindelig meddelelse-----
Fra: Wendy Smoak [mailto:***@wendysmoak.com]
Sendt: 20. januar 2005 03:00
Til: Tomcat Users List
Emne: Re: 403 Forbidden

From: "Søren Blidorf" <***@nolas.dk>
To: <tomcat-***@jakarta.apache.org>
Sent: Wednesday, January 19, 2005 4:08 PM
Subject: 403 Forbidden
Post by Søren Blidorf
I have setup my web.xml error page "403 Forbidden" to go to my page
"restrictedError.jsp"
I cannot get it to work!
What have you tried? I'm having a similar problem, though I'm trying to
trap certain types of Exceptions (rather than error codes) and send the
user
to a certain .jsp.

Post the relevant parts of [I assume] web.xml and hopefully someone can
help
us both. :)
--
Wendy Smoak


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org
Didier McGillis
2005-01-20 13:32:44 UTC
Permalink
Sorry I missed this.
Subject: SV: 403 Forbidden
Date: Thu, 20 Jan 2005 08:29:46 +0100
<error-code>500</error-code>
<location>/internalError.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/notFoundError.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/restrictedError.jsp</location>
</error-page>
<error-page>
<error-code>400</error-code>
<location>/public/jada.jsp</location>
</error-page>
<error-page>
<exception-type>SendFailedException</exception-type>
<location>/mailError.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.NullPointerException</exception-type>
<location>/NullPointerException.jsp</location>
</error-page>
<error-page>
<exception-type>java.net.UnknownHostException</exception-type>
<location>/mailError.jsp</location>
</error-page>
<error-page>
<exception-type>org.apache.jasper.JasperException</exception-type>
<location>/internalError.jsp</location>
</error-page>
-----Oprindelig meddelelse-----
Sendt: 20. januar 2005 03:00
Til: Tomcat Users List
Emne: Re: 403 Forbidden
Sent: Wednesday, January 19, 2005 4:08 PM
Subject: 403 Forbidden
Post by Søren Blidorf
I have setup my web.xml error page "403 Forbidden" to go to my page
"restrictedError.jsp"
I cannot get it to work!
What have you tried? I'm having a similar problem, though I'm trying to
trap certain types of Exceptions (rather than error codes) and send the
user
to a certain .jsp.
Post the relevant parts of [I assume] web.xml and hopefully someone can
help
us both. :)
--
Wendy Smoak
---------------------------------------------------------------------
---------------------------------------------------------------------
Didier McGillis
2005-01-20 13:31:40 UTC
Permalink
Have you tried this.
WEB_INF/web.xml
<error-page>
<error-code>403</error-code>
<location>/errorpages/403.jsp</location>
</error-page>
Post by Wendy Smoak
Subject: 403 Forbidden
Date: Thu, 20 Jan 2005 00:08:15 +0100
Hi.
I have setup my web.xml error page "403 Forbidden" to go to my page
"restrictedError.jsp"
I cannot get it to work!
Can it be because I use a danish browser where the error code is "403
Forbudt"
BR
Soren
---------------------------------------------------------------------
Wendy Smoak
2005-01-20 21:55:14 UTC
Permalink
Post by Didier McGillis
Have you tried this.
WEB_INF/web.xml
<error-page>
<error-code>403</error-code>
<location>/errorpages/403.jsp</location>
</error-page>
Based on his other post, Soren has tried that, and I have a similar problem
with <exception-type> (he's using <error-code>). I'm on Tomcat 4.1, Java
1.5, HP-UX 11.

I have this in web.xml:
<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/WEB-INF/jsp/exceptionServlet.jsp</location>
</error-page>

But when I throw a Servlet Exception from my code, I see the usual error
page instead of the JSP I've specified.

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request
exception
javax.servlet.ServletException: No data found in the HOLD file under key ...

Is anyone successfully using <error-page>? What are we doing wrong?
--
Wendy Smoak
James Sys
2005-01-27 18:43:57 UTC
Permalink
Hi Soren and Wendy,

I wondered if either of you have made progress with this problem. It's so=
mething I too would like to use, so I'm keen to pick your brains.

Thanks,

James.
------

Have you tried this.
WEB_INF/web.xml
<error-page>
<error-code>403</error-code>
<location>/errorpages/403.jsp</location>
</error-page>
Post by Wendy Smoak
Subject: 403 Forbidden
Date: Thu, 20 Jan 2005 00:08:15 +0100
Hi.
I have setup my web.xml error page "403 Forbidden" to go to my page
"restrictedError.jsp"
I cannot get it to work!
Can it be because I use a danish browser where the error code is "403
Forbudt"
BR
Soren
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-***@jakarta.apache.org
For additional commands, e-mail: tomcat-user-***@jakarta.apache.org
Loading...