java url 通配符_servlet url通配符

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);

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值