-
Dec 8th, 2005, 06:34 AM
#1
How To Redirect 403 Response To Friendly Page
Hi,
Not sure if anyone has done this, but is it possible to redirect the 403 thrown by acegi to a customised page? Does anyone have a solution?
Regards
-
Dec 8th, 2005, 07:52 AM
#2
In the web.xml, you can define an error page based on the error-code element. This documentation is from BEA, but it's the same for all servlet containers.
http://e-docs.bea.com/wls/docs81/web...l.html#1017571
-
Dec 8th, 2005, 07:57 AM
#3
Thanks Karl,
did do this:
<error-page>
<error-code>403</error-code>
<location>403.jsp</location>
</error-page>
but it never worked..
-
Dec 8th, 2005, 09:14 AM
#4
Hmmmm... what page did you get when you tried that?
-
Dec 8th, 2005, 09:18 AM
#5
Just looked in one of my old projects. You may be missing a forward slash if the 403.jsp is in the root of your webapp.
<error-page>
<error-code>403</error-code>
<location>/403.jsp</location>
</error-page>
Where is the 403.jsp? If you wanted to hit the 403.jsp directly, what URL would you use?
-
Dec 8th, 2005, 09:24 AM
#6
Hi,
have tried the /403.jsp too - that didn't work either. what actaully gets displayed is an auto-generated forbidden page..
if i hit the 403.jsp directly it does get displayed.
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules