Java身份验证表单 - Etat HTTP 408 - 已超出登录过程所允许的时间

时间:2014-04-10 13:12:20

标签: java jquery restful-authentication http-status-code-408

我们需要在用户访问某些Web服务组时对其进行身份验证。为此,我们使用auth方法FORM。

当用户在文本区域内输入信息并单击该按钮时,应用程序将尝试调用Web服务。此Web服务是安全的,用户需要首先进行身份验证。身份验证表单将显示为弹出窗口(jquery效果)。

以下是代码:

     <!DOCTYPE html>
    ...
    <meta http-equiv="Cache-Control" content="no-store,no-cache,must-revalidate"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Expires" content="-1"/>
    ...
    <script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="jquery.bpopup.min.js"></script>
    <script type="text/javascript">

        $(document).ready(function() {
            var $form = $('form');

               ;(function($) {
                  $(function() {
                    $('#update').bind('click', function(e) {
                        e.preventDefault();
                        $('#popupLogin').bPopup();
                    });
                });
              })(jQuery);


           });
    </script>
    </head>

<body>
    <div style="padding-left: 30px;">
        <h1 style="padding-left: -20px;">Create a new <i>Clinic</i></h1>
    <div id="popupLogin" style="display:none;">
        <form action="j_security_check" method="post">
            <div>
                <table>
                    <tr>
                        <td><span>Username</span></td>
                        <td><input type="text" style="width: 50px;" name="j_username" /></td>
                    </tr>
                    <tr>
                        <td><span>Password</span></td>
                        <td><input type="password" style="width: 50px;" name="j_password" /></td>
                    </tr>
                    <tr>
                        <td colspan="2"><input type="submit" value="Login" /></td>
                    </tr>
                </table>
            </div>
        </form>
    </div>
    <form id="form">
        Clinic Name: <input type="text" name="name" /><br /><br />
        <input type="button" id="update" value="Add Clinic" />  
    </form>
</div>

问题是每当我提交正确的登录信息时,它都会重定向到这个408错误:

  

Etat HTTP 408 - 已超出登录过程所允许的时间。如果您希望继续,则必须单击两次并重新单击您请求的链接或关闭并重新打开浏览器

有任何解决方案吗?

0 个答案:

没有答案