1、String contextPath = httpServletRequest.getServletContext().getContextPath();

/项目名称

2、String contextPath2 = httpServletRequest.getContextPath();

/项目名称

3、String requestURI = httpServletRequest.getRequestURI();

/项目名称/自定义.jsp

4、StringBuffer requestURL = httpServletRequest.getRequestURL();

http://localhost:8089/项目名称/自定义.jsp

5、String servletPath = httpServletRequest.getServletPath();

/自定义.jsp

相关文章:

  • 2021-12-05
  • 2021-05-22
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
相关资源
相似解决方案