request获取路径的方式和区别

  假定你的web application 名称为news,你在浏览器中输入请求路径: http://localhost:8080/news/main/list.jsp   则执行下面向行代码后打印出如下结果: 1、 System.out.println(request.getContextPath()); 打印结果:/news   2、System.out.println(request.get
相关文章
相关标签/搜索