这是我的 Dem.html 页面在我单击“okeeee”按钮时无法正确执行,未生成事件
<form action="http://localhost:7000//DemoS/MyServlet" method="post">
</form>
<input type="text" name="e">
<input type="text" name="p">
<input type="submit" value="Okeeeeeeee">
post servlet 方法:
public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String e=request.getParameter("e");
String p=request.getParameter("p");out.println(" <HEAD><TITLE>A Servlet</TITLE></HEAD>");
out.println(" <BODY>");
out.println(", using the POST method abhinav hiii"+e+""+p);
out.println(" </BODY>");out.println("</HTML>");
}