与我之前遇到的类似问题,但是这次之前的解决方法不起作用。与 相关的代码抛出如下所示的错误
如果图像无法加载这里的代码
LongLivedCookie c =
new LongLivedCookie("accessCount",
String.valueOf(count+1));
response.addCookie(c);
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String title = "Access Count Servlet";
String docType =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
"Transitional//EN\">\n";
out.println(docType +
"<HTML>\n" +
"<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" +
"<BODY BGCOLOR=\"#FDF5E6\">\n" +
"<CENTER>\n" +
"<H1>" + title + "</H1>\n" +
"<H2>This is visit number " +
count + " by this browser.</H2>\n" +
"<form id="form" name="form" method="post" action='Question_3.jsp'
padding="10" >" +
"<button type="submit">Submit</button> " +
"</CENTER></BODY></HTML>");
}
}