用的是Glassfish2.1 Enterprise服务器
没Login的时候,点击登录后可以正常认证。
但是当我点了浏览器的后退按钮再登录的时候
报了404错误。
调查了好久都弄不明白
web.xml
    <security-constraint>
        <display-name>OpenDS Constraint</display-name>
        <web-resource-collection>
            <web-resource-name>OpenDS Constraint</web-resource-name>
            <description/>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <description/>
            <role-name>Authorized</role-name>
        </auth-constraint>
    </security-constraint>
    <login-config>
        <auth-method>FORM</auth-method>
        <realm-name>OpenDS</realm-name>
        <form-login-config>
            <form-login-page>/login.jsp</form-login-page>
            <form-error-page>/error.jsp</form-error-page>
        </form-login-config>
    </login-config>
    <security-role>
        <description>All authorized users (with any group permission)</description>
        <role-name>Authorized</role-name>
    </security-role>login.jsp    <body>
        <h1>Login to XXXX</h1>
        <form class="cssform" action="j_security_check" method="POST">
             <p>
                 <label for="user">Username</label>
                 <input type="text" name="j_username" id="user">
             </p>
              <p>
                  <label for="pwd">Password</label>
                  <input type="password" name="j_password" id="pwd">
              </p>
              <input type="submit" value="Login">
          </form>
    </body>