解决idea jsp自定义标签 500报错问题

新人首贴,请多多包涵。

在idea用自定义标签时出现了个小问题,运行的时候一直500报错,百度了许多个答案都是说什么缺少jar包、需要在web.xml里面注册。而实际上servlet v2.4之后就不需要在web.xml文件里注册了。

一个早上经历了多次
HTTP Status 500 – Internal Server Error
file:xxx not found

HTTP Status 500 – Internal Server Error
The absolute uri: xxx cannot be resolved in either web.xml or the jar files deployed with this application
的报错信息,都快要崩溃了。话不多说,下面说下自己的解决方法。

打开Project Structure -> Artifacts,点击+号选择file。
(划重点:一定要添加在WEB-INF文件夹里面!!!)
解决idea jsp自定义标签 500报错问题

然后选择你要使用的tld文件,保存,
解决idea jsp自定义标签 500报错问题
解决idea jsp自定义标签 500报错问题
最后,重新启动服务器,就可以了。

注意:tld文件和<%taglib>标签均无报错。