问题:  在jsp中使用${pageContext.request.contextPath}获取相对路径,可是最后路径变为:http://localhost:8080/TMIS/$%7BpageContext.request.contextPath%7D/static/LayUI/layui.all.js

jsp里面不能使用${pageContext.request.contextPath}解决方案

如何解决呢?

在jsp页面头部加上
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>

jsp里面不能使用${pageContext.request.contextPath}解决方案

 

再次访问,页面正常显示

jsp里面不能使用${pageContext.request.contextPath}解决方案 

相关文章:

  • 2022-12-23
  • 2021-07-28
  • 2021-06-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2022-01-16
猜你喜欢
  • 2021-09-08
  • 2021-05-24
  • 2021-04-20
  • 2021-05-02
  • 2021-04-05
  • 2021-06-08
相关资源
相似解决方案