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="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>
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用
或
因此,替换
为
或
应该可以解决您的问题。
请注意,这个问题与 JSF 没有任何关系。它只与基本的 HTML 相关。
You should be using
<input type="submit">
or<button type="submit">
instead of a standard button to have a fullworthy submit button.So, replacing
by
or
should fix your problem.
Please note that this problem is in no way related to JSF. It's just related to basic HTML.