Announcement Announcement Module
Collapse
No announcement yet.
Problem with Login Page Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Login Page

    I'm new to Spring Security and am not able to get the login page. I'm getting the following:
    The requested resource (/securitytest/login.jsp) is not available. I have defined under WEB-INF. What am I doing wrong?

    I have this in the context.xml:
    <property name="objectDefinitionSource">
    <value><![CDATA[
    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
    PATTERN_TYPE_APACHE_ANT
    /index.jsp=ROLE_SUPERVISOR
    /state*.htm=ROLE_ADMIN /login.jsp=IS_AUTHENTICATED_ANONYMOUSLY
    /**=IS_AUTHENTICATED_ANONYMOUSLY
    ]]></value>
    </property>

    <bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFi lter">
    <property name="authenticationEntryPoint">
    <bean class="org.acegisecurity.ui.webapp.AuthenticationP rocessingFilterEntryPoint">
    <property name="loginFormUrl" value="/login.jsp"/>
    <property name="forceHttps" value="false"/>
    </bean>
    </property>
    <property name="accessDeniedHandler">
    <bean class="org.acegisecurity.ui.AccessDeniedHandlerImp l">
    <property name="errorPage" value="/accessDenied.jsp"/>
    </bean>
    </property>
    </bean>

    Any help would be greatly appreciated.

  • #2
    try keeping ur login.jsp outside WEB-INF folder

    Comment


    • #3
      login page

      Thanks, I did that and am getting a jsp error now: EVERE: Servlet.service() for servlet jsp threw exception
      org.apache.jasper.JasperException: /login.jsp(25,4) According to TLD or attribute directive in tag file, attribute test does not accept any expressions

      However, why would I need to put the login.jsp outside of the WEB-INF? All of my other jsps are in sub-folders within the WEB-INF. Thanks for the help.

      Comment


      • #4
        Can you post your application directry structure?

        Comment


        • #5
          login page

          I have attached my structure

          Comment


          • #6
            Originally posted by dorr67 View Post
            I'm new to Spring Security and am not able to get the login page. I'm getting the following:
            The requested resource (/securitytest/login.jsp) is not available. I have defined under WEB-INF. What am I doing wrong?

            I have this in the context.xml:
            <property name="objectDefinitionSource">
            <value><![CDATA[
            CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
            PATTERN_TYPE_APACHE_ANT
            /index.jsp=ROLE_SUPERVISOR
            /state*.htm=ROLE_ADMIN /login.jsp=IS_AUTHENTICATED_ANONYMOUSLY
            /**=IS_AUTHENTICATED_ANONYMOUSLY
            ]]></value>
            </property>

            <bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFi lter">
            <property name="authenticationEntryPoint">
            <bean class="org.acegisecurity.ui.webapp.AuthenticationP rocessingFilterEntryPoint">
            <property name="loginFormUrl" value="/login.jsp"/>
            <property name="forceHttps" value="false"/>
            </bean>
            </property>
            <property name="accessDeniedHandler">
            <bean class="org.acegisecurity.ui.AccessDeniedHandlerImp l">
            <property name="errorPage" value="/accessDenied.jsp"/>
            </bean>
            </property>
            </bean>

            Any help would be greatly appreciated.
            (/securitytest/login.jsp) why the url has securitytest when in your directory structure i cannot figure out any folder like securitytest there.

            Could you post the complete securitycontext.xml file?

            Comment


            • #7
              login page

              Actually, securitytest was an example of the error that I was getting. The actual error is:
              The requested resource (/weblease/login.jsp) is not available. I have defined under WEB-INF

              Comment


              • #8
                I don't even see a weblease folder?

                Am i missing something.

                Comment


                • #9
                  login page

                  the top-most folder is WebLease

                  Comment


                  • #10
                    login page

                    Attached is the folder structure again.

                    This is my config:
                    <property name="objectDefinitionSource">
                    <value><![CDATA[
                    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
                    PATTERN_TYPE_APACHE_ANT
                    /index.jsp=ROLE_SUPERVISOR
                    /state*.htm=ROLE_ADMIN
                    /web-inf/jsp/login/login.jsp=IS_AUTHENTICATED_ANONYMOUSLY
                    /**=IS_AUTHENTICATED_ANONYMOUSLY
                    ]]></value>
                    </property>

                    <bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFi lter">
                    <property name="authenticationEntryPoint">
                    <bean class="org.acegisecurity.ui.webapp.AuthenticationP rocessingFilterEntryPoint">
                    <property name="loginFormUrl" value="/WEB-INF/jsp/login/login.jsp"/>
                    <property name="forceHttps" value="false"/>
                    </bean>
                    </property>
                    <property name="accessDeniedHandler">
                    <bean class="org.acegisecurity.ui.AccessDeniedHandlerImp l">
                    <property name="errorPage" value="/accessDenied.jsp"/>
                    </bean>
                    </property>


                    My login page is in the folder structure under: WEB-INF/jsp/login/login.jsp but I'm getting a 404 Error that it can't find it and this shows in the url:
                    http://localhost:8080/weblease/WEB-I...ogin/login.jsp

                    Comment

                    Working...
                    X