Results 1 to 2 of 2

Thread: Redirect to / after login in glassfish 2.0

  1. #1
    Join Date
    Sep 2011
    Posts
    1

    Default Redirect to / after login in glassfish 2.0

    Hello

    I'm new in spring security and i have some problems in the after login process. The first time the user login the application it's redirected to http://192.168.2.143:36582/web/ or http://192.168.2.143:36582/web/favicon.ico. but the next i login the app time the redirect process is well executed. My configuration file is:

    <security:http auto-config="true" >
    <!-- Restrict URLs based on role -->
    <security:intercept-url pattern="/login*" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    <security:intercept-url pattern="/css/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
    <security:intercept-url pattern="/images/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />

    <security:intercept-url pattern="/**" access="ROLE_USER, ROLE_ADMIN, ROLE_SUPERVISOR, ROLE_CLINIC" />

    <!-- Override default login and logout pages -->
    <security:form-login login-page="/login.jsp"
    login-processing-url="/loginProcess"
    default-target-url="/pci-flow.html"
    authentication-failure-url="/login.jsp?login_error=1" />
    <security:logout logout-url="/logout" invalidate-session="true" logout-success-url="/login.jsp" />
    </security:http>

    But it only happens when i excecute the web application inside a Glassfish server 2.0 if I run the app insite the 3.0 version of glassfish I don't have that problem, I have some days trying to fix this problem.

    I will apreciate any tip I'm realiy desperate. Tanks

  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    You should grant access to any user for the favicon.ico (or anything else that the page may be requesting on the login page).

    PS: Please use the code tags (i.e. the # button) for posting code/configs/logs as this makes it easier to read.
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

Tags for this Thread

Posting Permissions

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