我是靠谱客的博主 粗暴蜻蜓,这篇文章主要介绍${pageContext.request.contextPath}无法解析乱码使用不了在jsp中${pageContext.request.contextPath}解析乱码解决方案:,现在分享给大家,希望可以做个参考。
在jsp中${pageContext.request.contextPath}解析乱码
${pageContext.request.contextPath}解析乱码或使用不了

解决方案:
web.xml 2.3版本不支持el表达式子 只要把版本换成2.3以上就可以 还有${pageContext}没有提示 没有导入jsp坐标 导入坐标就可以解决
web.xml
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
jsp坐标
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
</dependency>
最后
以上就是粗暴蜻蜓最近收集整理的关于${pageContext.request.contextPath}无法解析乱码使用不了在jsp中${pageContext.request.contextPath}解析乱码解决方案:的全部内容,更多相关${pageContext内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复