Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: How To Redirect 403 Response To Friendly Page

  1. #11
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Yes, you can catch org.acegisecurity.AccessDeniedException as the MVC controller. The SecurityEnforcementFilter (which usually catches this exception) will never have it propagate up from the DispatcherServlet.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  2. #12

    Default Any body successfully used exceptionResolver?

    I mapped org.acegisecurity.AccessDeniedException in a exceptionResolver, but 403 does not get forwarded to the error page.

    Can we use Spring settings or we need to use web.xml to forward to a particular jsp file in case of the 403 error?

  3. #13
    Join Date
    Jan 2006
    Location
    Stabekk, Norway
    Posts
    9

    Default

    Quote Originally Posted by Damendra
    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.
    If the problem occours in IE, but not in other browsers - it's IE's pretty-error-print functionality that is the problem. Your error page is to small, it needs to be atleast 10kB (add a long comment to make it larger). Read more about the problem at:
    http://www.hostedfaqs.com/123hosts/f...rror-pages.php

    BTW: This is a reply to the web.xml solution with the errorcode/-page mapping.

    - Jørgen Løkke -
    Last edited by jorlokk; Mar 3rd, 2006 at 02:20 AM.

  4. #14
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    In 1.0.0 RC2 we refactored error handling into an ExceptionTranslationFilter, so take a look at that and see if it makes it easier for you to handle 403s in a custom manner.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •