2011-06-30 20 views
0

不工作我有一个简单的JSF应用程序开发并在Tomcat 6.0.13工作。通过在web.xml中添加常用设置,我为整个应用程序添加了一些安全约束条件。j_security_check为JSF应用程序在IE

当我现在将应用程序部署到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="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> 

感谢

回答

1

你应该使用<input type="submit"><button type="submit">,而不是一个标准的按钮有一个fullworthy提交按钮。

因此,通过

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

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

更换

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

应该解决您的问题。

请注意,这个问题是没有办法与JSF。它只与基本的HTML有关。

+0

抓到我坏,谢谢@BalusC你救了我的一天。 – ManiP

+0

不客气。既然你是新来者,请不要忘记标记答案(大多数时候帮助解决你的问题)。另见http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work/5235#5235 – BalusC