日期:2014-05-16  浏览次数:20376 次

如何自动登录类似tomcat的http://localhost:8080/manager/html 窗口提示的用户名和密码。
如何自动登录类似tomcat的http://localhost:8080/manager/html   窗口提示的用户名和密码。

提示:该登录窗口不是普通的IE窗口,类似windows登录网上邻居的那种登录窗口。

------解决方案--------------------
帮顶了。
------解决方案--------------------
这个偶不会.帮顶.
------解决方案--------------------
Response.Status= "401 not Authorized " 是强制要求输入密码
------解决方案--------------------
type username and pwd by your fingers.
------解决方案--------------------
jsp:在开始位置加入如下代码

<%
String authorization=request.getHeader( "Authorization ");
if (authorization == null)
{
response.setHeader( "WWW-Authenticate ", "BASIC realm=\ "请登陆....\ " ");
response.setStatus(401);
}
%>