When attempting to log into a standard form-based login field, I'm always
redirected to an image folder.

My folder layout:
/img
/web-inf/
/web-inf/web.xml
/index.jsp
/login.jsp
/error.jsp

setup:
Spring2.5/tiles2/tomcat5.5

in my web.xml:
[code]
<security-constraint>
    <display-name>Security Constraint</display-name>
    <web-resource-collection>
      <web-resource-name>Protected Pages</web-resource-name>
      <url-pattern>/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>myAdmin</role-name>
    </auth-constraint>
  </security-constraint>

    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
            <form-login-page>/login.jsp</form-login-page>
            <form-error-page>/error.jsp</form-error-page>
        </form-login-config>
    </login-config>
[/code]

pretty standard stuff. If you want to see any of the other code, just ask...

What happens:
1. I attempt to go to a url
2. It properly stops me and asks me to login
3. I enter user credentials and hit login
4. It sucessfully logins.
5. It redirects me to /img/myimage.gif

every time.

I know that the login works fine, as when I fix my url to the url i was
originally at, everything is correctly authenticated. Is there a way to set
a default url when you attempt to login?
Anyone else get a similar problem before?

Reply via email to