Announcement Announcement Module
Collapse
No announcement yet.
Redirect page for unauthorized access Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redirect page for unauthorized access

    How can I specify a page where user should be redirected in case of unauthorized access.?
    I secured the pages using SecurityEnforcementFilter, but when the use is not authorized to access the page, it redirects to standard http "Not authorized" page. I want to specify my own page.

    how can I do this?

  • #2
    Ok I found the solution,
    defining the error-page entry in web.xml should resolve this problem.
    <error-page>
    <error-code>403</error-code>
    <location>/error403.jsp</location>
    </error-page>

    Comment


    • #3
      It would be nice to decide what's the error page depending on user identification or role, is this possible using Acegi Security?

      Thanks a lot!

      Comment


      • #4
        You could just decide what is shown within your error jsp.

        If you really wanted to change the behaviour on an AccessDeniedException then you could override the sendAccessDeniedError method in SecurityEnforcementFilter.

        Comment

        Working...
        X