packagecom.zjb.servlet;importjava.io.IOException;importjava.io.PrintWriter;importjavax.servlet.ServletException;importjavax.servlet.http.HttpServlet;importjavax.servlet.http.HttpServletRequest;importjavax.servlet.http.HttpServletResponse;public class HelloServlet extendsHttpServlet {/*** The doGet method of the servlet.
*
* This method is called when a form has its tag value method equals to get.
*
*@paramrequest
* the request send by the client to the server
*@paramresponse
* the response send by the server to the client
*@throwsServletException
* if an error occurred
*@throwsIOException
* if an error occurred*/
public voiddoGet(HttpServletRequest request, HttpServletResponse response)throwsServletException, IOException {
response.setContentType("text/html");
response.setCharacterEncoding("utf-8");
PrintWriter out=response.getWriter();
out.println("网站在整改中,暂时关闭");
}/*** The doPost method of the servlet.
*
* This method is called when a form has its tag value method equals to
* post.
*
*@paramrequest
* the request send by the client to the server
*@paramresponse
* the response send by the server to the client
*@throwsServletException
* if an error occurred
*@throwsIOException
* if an error occurred*/
public voiddoPost(HttpServletRequest request, HttpServletResponse response)throwsServletException, IOException {
doGet(request, response);
}
}