这个问题是指不使用规范的访问方式也能返回页面内容
1.在过滤器限制请求方式
if(!"GET".equals(method)&&!"POST".equals(method)&&!"HEAD".equals(method)){
response.setContentType("text/html;charset=GBK");
response.setCharacterEncoding("GBK");
response.setStatus(403);
response.getWriter().print("<font size=6 color=red>对不起,您的请求非法,系统拒绝响应!</font>");
return;
}else{
}