jsf应用程序j_security_check不在IE中工作 [英] j_security_check for jsf app not working in IE

查看:138
本文介绍了jsf应用程序j_security_check不在IE中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的jsf应用程序开发和工作在tomcat 6.0.13。我通过在web.xml中添加常规设置,为整个应用程序添加了一些安全限制。

当我现在将应用程序部署到tomcat并检查时,它在firefox中绝对正常,我得到了我的Login.html呈现(代码如下),一旦授权,我需要相关页面。当我导航到IE浏览器中的相同的应用程序,我得到如下登录提示,但点击提交按钮不会做任何事情。它只是呆在那里,因为它不会回发到服务器,因为服务器似乎没有得到任何来自客户端浏览器的响应(没有错误,没有日志等)。

 < html> 
< head>
< style type =text / css>
.cssGenericHeaderColumn
{
font-family:Verdana,Arial,Sans-Serif;
font-size:14px;
font-weight:bold;
text-align:left;
vertical-align:left;
}
.cssGenericEntryLabel
{
font-family:Verdana,Arial,Sans-Serif;
font-size:13px;
font-weight:lighter;
text-align:left;
vertical-align:top;
}
< / style>
< / head>
< body>
< form method =POSTaction =j_security_check>

< table align =center>
< tr>
< td colspan =2class =cssGenericHeaderColumn>
欢迎使用blah blah
< / td>
< / tr>
< tr>
< td class =cssGenericEntryLabel>
用户名
< / td>
< td class =cssGenericEntryLabel>
< input type =textname =j_username>


< / td>
< / tr>
< tr>
< td class =cssGenericEntryLabel>
密码
< / td>
< td class =cssGenericEntryLabel>
< input type =passwordname =j_password>
< / td>
< / tr>
< tr>
< td>
< / td>
< td class =cssGenericEntryLabel>
< button class =cssGenericEntryLabel>提交< /按钮>
< / td>
< / tr>
< / table>
< / form>
< / body>



谢谢

$您应该使用< input type =submit> 或<

解决方案

c $ c>< button type =submit> 而不是一个标准的按钮来拥有一个完整的提交按钮。

替换

 < button class =cssGenericEntryLabel>提交< / button> 

by

 < button type =submitclass =cssGenericEntryLabel>提交< / button> 

 < input type =submitvalue =Submitclass =cssGenericEntryLabel/> 

可以解决您的问题。

请请注意,这个问题与JSF没有任何关系。这只是与基本的HTML有关。


I have a simple jsf app developed and working on tomcat 6.0.13. I added some security contraints to the entire application by adding the usual setting in web.xml.

When I now deploy the application to tomcat and check, it works absolutely fine in firefox, I get my Login.html rendered(code below) and once authorised takes me to the relevant page. When I navigate to the same app in IE, i get the login prompt as below but clicking on the Submit button doesn't do anything. It just stays there like it's not posting back to the server, as the server doesn't seem to get any response from the client browser(no errors, no logs, etc).

What am I doing wrong?

<html>
    <head>
        <style type="text/css">
            .cssGenericHeaderColumn
            {
                font-family: Verdana, Arial, Sans-Serif;
                font-size:14px;
                font-weight: bold; 
                text-align: left; 
                vertical-align: left;
            } 
            .cssGenericEntryLabel 
            {
                font-family: Verdana, Arial, Sans-Serif;
                font-size:13px;
                font-weight: lighter; 
                text-align: left; 
                vertical-align: top;
            }           
        </style>
    </head>
    <body>      
        <form method="POST" action="j_security_check">

        <table align="center">
            <tr>
                <td colspan="2" class="cssGenericHeaderColumn">
                    Welcome to blah blah
                </td> 
            </tr>
            <tr>
                <td class="cssGenericEntryLabel"> 
                    User name  
                </td>
                <td class="cssGenericEntryLabel">
                    <input type="text" name="j_username">


                </td> 
            </tr>
            <tr>
                <td class="cssGenericEntryLabel"> 
                    Password  
                </td>
                <td class="cssGenericEntryLabel">
                    <input type="password" name="j_password">
                </td> 
            </tr>
            <tr>
                <td> 
                </td>
                <td  class="cssGenericEntryLabel">
                    <button  class="cssGenericEntryLabel"> Submit </button>
                </td> 
            </tr>
        </table>
    </form>
</body>

Thanks

解决方案

You should be using <input type="submit"> or <button type="submit"> instead of a standard button to have a fullworthy submit button.

So, replacing

<button class="cssGenericEntryLabel">Submit</button>

by

<button type="submit" class="cssGenericEntryLabel">Submit</button>

or

<input type="submit" value="Submit" class="cssGenericEntryLabel" />

should fix your problem.

Please note that this problem is in no way related to JSF. It's just related to basic HTML.

这篇关于jsf应用程序j_security_check不在IE中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆