SSM项目中使用自定义标签报错:The absolute uri:XXX/XXX/XXX/ cannot be resolved in either web.xml or the jar files
2019年3月29日22:00:37
使用环境:IDEA+MAVEN+SSM整合
页面使用自定义标签显示为:
使用的自定义标签库为:
访问使用该自定义标签库的jsp页面报错内容如下:部分代码
org.apache.jasper.JasperException:
The absolute uri: http://itcast.cn/common/ cannot be resolved in either web.xml
or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:445)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:117)
解决办法
在web.xml配置文件中配置访问该url的关联路径
如下所示:
<jsp-config>
<taglib>
<taglib-uri>http://hlwxy/common</taglib-uri>
<taglib-location>/tld/commons.tld</taglib-location>
</taglib>
</jsp-config>
Taglib-url为访问的自定义url
taglib-location为你的.tld的相对文件地址
**
重新运行该项目
**
对于SpringMVC静态页面加载的话,请参考其他文章…
友情提示:
道路千万条,安全第一条
代码不规范,亲人两行泪