Taglib Issue in Eclipse Maven
I'm trying to import a multi-module maven project into Eclipse which has multiple JSPs. The project uses techonologies in Spring framework including web & web MVC.
With the m2e plug I have imported the main POM which has created mulitple sub projects with correct dependencies etc. All seems just about ok with this.
The issue I'm having is that all the JSPs define the URI to the Spring-MVC taglib spring.tld
as :
<%@ taglib uri="/spring" prefix="spring"%>
Yet the spring.tld file is at /WEB-INF/spring.tld, so I am seeing a lot of errors in Eclipse saying Can not find the tag library descriptor for "/spring"
This is not an issue at runtime in the resulting WAR as the web.xml file has the 'redirection' as :
<jsp-config>
<taglib>
<taglib-uri>/spring</taglib-uri>
<taglib-location>/WEB-INF/spring.tld</taglib-location>
</taglib>
<..>
</jsp-config>
How do I tell Eclipse that for URI references to the taglib '/spring' to actually look fro '/WEB-INF/spring.tld', or just to ignore this and set it on the modules classpath using Maven dependencies ?
As I want to keep the source code as close to the original source pre-import, I don't want to go through multiple JSPs to fix this, nor do I want to rename and move the taglib to '/spring'.
Thanks
链接地址: http://www.djcxy.com/p/74686.html上一篇: JSP JSTL和其他指令不被识别