Is this because of the location of spring.jar?
Yes. The TLD can be found implicitly in the META-INF directory of JARs in WEB-INF/lib (you can make it explicit as shown below - relative to WEB-INF):
Code:
<taglib>
<taglib-uri>/springframework</taglib-uri>
<taglib-location>lib/spring.jar</taglib-location>
</taglib>
is there any way to get it to work with spring.jar in a different location?
Yes. Copy spring.tld into /WEB-INF/tlds. It should be found implicitly, but you can make it explicit by adding the following to the web.xml.
Code:
<taglib>
<taglib-uri>/springframework</taglib-uri>
<taglib-location>/WEB-INF/tlds/spring.tld</taglib-location>
</taglib>
then it can be used as:
Code:
<%@ taglib uri=”/springframework” prefix=”spring” %>
There is a fallback rule with 2.4 that is less flexible, so you could use:
Code:
<%@ taglib uri=”/WEB-INF/tlds/spring.tld” prefix=”spring” %>