排错记录
学习中遇到的错误
卡夫卡的狗
道阻且长,行且将至。
展开
-
IDEA:request.getServletContext()的问题
IDEA:request.getServletContext()的问题 ServletRequest的getServletContext方法是Servlet3.0添加的,**本地用的是Tomcat9.0,版本比较高,**支持request.getServletContext()这种写法,而线上是Tomcat6.0,只支持到Servlet2.5,需要先用request拿到HttpSession或者通过Servlet自身拿到ServletConfig之后再获取ServletContext, 这两天在做项目,需要原创 2020-10-17 17:53:35 · 968 阅读 · 0 评论 -
unable to open the service tomcat6报错
unable to open the service tomcat6报错 在电脑上安装tomcat6后,开机总是报错 最终解决办法:网上说是兼容问题 所以设置两个地方 进入Tomcat安装路径的bin目录中,设置以兼容模式运行和管理员权限运行。 ...原创 2020-10-10 16:23:45 · 489 阅读 · 1 评论 -
springboot无法访问templates里的页面
检查Application启动类的位置.要将Application类放在最外侧,即包含所有子包 原因:spring-boot会自动加载启动类所在包下及其子包下的所有组件. 检查url路径正确,是不是controller中配置的 有没有导入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sprin.原创 2021-03-29 15:31:00 · 620 阅读 · 1 评论