身份验证问题

hebeiman 2003-12-07 12:03:31
我在weblogic8.1 中作了基于表单的验证 可是怎么也不执行
我的
public class LoginServlet
extends HttpServlet {
private static final String CONTENT_TYPE = "text/html; charset=GBK";
//Initialize global variables
public void init() throws ServletException {
}

public void service(HttpServletRequest request, HttpServletResponse response) throws
IOException {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head><title>BibleServlets</title></head>");
out.println("<body>");
out.println("<p> Welcom to BibleServlets! please log in.</p>");
out.println("<from method=\"POST\" action=\"" +
response.encodeURL("j_security_check") + "\">");
out.println("<p>User name:");
out.println("<input type=\"text\" name=\"j_username\"></p>");
out.println("<p>Password:");
out.println("<input type=\"text\" name=\"j_password\"></p>");
out.println(
"<p> <input type=\"submit\" name=\"Submit\" value=\"Login\"></p>");
out.println("</from>");
out.println("</body></html>");

}

//Clean up resources

public void destroy() {
}
}


web.xml

<login-config>
<auth-method>FORM</auth-method>
<realm-name>default</realm-name>
<form-login-config>
<form-login-page>/LoginServlet</form-login-page>
<form-error-page>/LoginError.html</form-error-page>
</form-login-config>
</login-config>

怎么不执行?


...全文
97 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hebeiman 2003-12-09
  • 打赏
  • 举报
回复
j_security_check 是weblogic 自带得
johncdc 2003-12-09
  • 打赏
  • 举报
回复
你应该还少一个j_security_check的SERVLET吧。不执行是什么意思?

1,233

社区成员

发帖
与我相关
我的任务
社区描述
企业软件 中间件技术
社区管理员
  • 中间件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧