j_security_check无效的直接引用

时间:2014-10-10 17:09:25

标签: security jsf jsf-2 jboss jaas

我目前在公开的,未受保护的http页面上有一个登录表单。登录后,我希望页面重定向到安全的https页面。我尝试登录时收到此错误屏幕:

HTTP 400

我90%确定我的语法准确无误。我有这个确切的形式作为网站上其他地方的登录页面。此实现用于允许用户登录的下拉框。这是我的表格供参考。感谢任何帮助,谢谢。

<div class="login-options">
    <form id="login" name="j_security_form" action="<%out.write(Dropdown.getXML("https://www.xxx.com/public/j_security_check")); %>" method="post" accept-charset="UTF-8">
        <strong>Account Login</strong><br>
            Username:<br>
                <input type="text" name="j_username"><br>
            Password:<br>
                <input type="password" name="j_password"><br>
            <br>
                <input type="submit" value="Login"><br>
            <br>
                New users <a href="../xxx/user_registration.jsp">register here</a><br>
                <a href="../xxx/forgot_password.jsp">Forgot password?</a>
                <input type="hidden" name="auth_mode" value="basic">        
            <script>
            var newloc = document.location.href;
            newloc =newloc.replace('index.jsp','index.jsp');
            document.write('<input type="hidden" name="orig_url" value="'+newloc+'">');
            </script>
    </form>
</div>

1 个答案:

答案 0 :(得分:2)

可能是因为您试图直接引用url j_security_check。我会尝试引用需要登录信用的页面,然后一旦看到有足够的凭据就会重定向到安全页面。

相关问题