身份验证问题
我在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>
怎么不执行?