Results 1 to 6 of 6

Thread: The absolute uri: http://www.springframework.org/tags/form cannot be resolved

  1. #1
    Join Date
    Jan 2009
    Posts
    18

    Default The absolute uri: http://www.springframework.org/tags/form cannot be resolved

    Can somebody help me in resolving this exception:

    1. I have following line in my JPSs and they are working fine:

    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

    But in the log, I'm getting the following exception:

    org.apache.jasper.JasperException: The absolute uri: http://www.springframework.org/tags/form cannot be resolved in either web.xml or the jar files deployed with this application
    at org.apache.jasper.compiler.DefaultErrorHandler.jsp Error(DefaultErrorHandler.java:50)

    Thanks

  2. #2
    Join Date
    Dec 2009
    Posts
    5

    Default

    Can you post structure of your war file?

  3. #3
    Join Date
    Nov 2006
    Location
    Boston, US
    Posts
    167

    Default

    Either the security-taglibs-3.x.jar is missing or there is no security.tld in META-INF inside the jar.
    Last edited by infinity2heaven; Feb 25th, 2011 at 01:32 PM.

  4. #4
    Join Date
    May 2011
    Location
    Melbourne
    Posts
    1

    Default

    For Spring 3 the tag library specified in the tag library directive (http://www.springframework.org/tags/form) is in the org.springframework.web.servlet-3.x.x.jar file. The URI in the directive must match the URI in the META-INF/spring-form/tld file in this jar file which is <uri>http://www.springframework.org/tags/form</uri>

    The container (at least Tomcat 7.0 does) will match the URI in the taglib directive of the jsp file, with the URI in the spring-form.tld file provided org.springframework.web.servlet jar-3.xx.jar is in the WEB-INF/lib directory.

    If you also add an entry to web.xml for the same tag library like:
    <jsp-config>
    <taglib>
    <taglib-uri>http://www.springframework.org/tags/form</taglib-uri>
    <taglib-location>spring-form.tld</taglib-location>
    </taglib>
    </jsp-config>

    then the container will only look for WEB-INF/spring-form.tld and will not find the tld in the jar file. To make this work you need to manually extract the spring-form.tld from the jar file and add it to the WEB-INF directory. I don't know of any good reason to do this and suspect that having an entry in web.xml is historic and now only causes confusion.

  5. #5
    Join Date
    Mar 2012
    Posts
    1

    Default Same problem

    I had the same problem as JavaCaravan, and I resolved it thx to davemac, but then I had another error :

    org.apache.jasper.JasperException: /admin/addeleve.jsp (line: 28, column: 5) Impossible to load the class org.springframework.web.servlet.tags.form.FormTag


    I don't understand what to do to solve this, as I already add the org.springframework.web.servlet-3.0.0.M3.jar.


    Thank you for your help!

  6. #6
    Join Date
    Feb 2013
    Posts
    5

    Default

    Hi,

    I'm having this exactly problem.

    When I run my Integration Test with tomcat or jetty I'm receiving this error.

    My app is an EAR -with 2 war's (spring) and 2 jars (core).

    Another problem I had regarding this taglib was to achieve deploy my EAR, the spring libs are in the EAR but unfortunately the spring-webmvc have to be inside the war to find the form of the spring taglib.

    In the end I got through some settings only add maven spring-webmvc no war without adding its dependencies.

    I need to solve this now when I run my integration tests with junit, I tried with embedded tomcat and jetty.

    Can someone please help me?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •