加一个处理GET的方法public class Registration extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{
doPost(req,res);
} public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{ res.setContentType("text/html");
PrintWriter out=res.getWriter();
out.println("<html><body>hhhhhh</body></html>");
}
}
{
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{
doPost(req,res);
} public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{ res.setContentType("text/html");
PrintWriter out=res.getWriter();
out.println("<html><body>hhhhhh</body></html>");
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货