servletContext.getContextPath()不存在

原创
2016/04/01 20:06
阅读数 3.1K

    这个问题是由于项目中没有加载servlet-api的2.5的包,引入以后问题就解决了。maven配置如下:

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>servlet-api</artifactId>
  <version>2.5</version>
 </dependency>

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
1
分享
返回顶部
顶部