Announcement Announcement Module
Collapse
No announcement yet.
The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved...

    I came to another issue when migrating web module project to dm Server 2.0.0.M4. And I think it is better ask here for help.

    The dm server log shows
    Code:
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
    	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
    	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    	org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
    	org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
    	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
    	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)
    	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
    	org.apache.jasper.compiler.Parser.parse(Parser.java:138)
    	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
    	org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
    	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
    	org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
    	org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
    	org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
    	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:239)
    	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
    	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1062)
    	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
    	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:709)
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:614)
    	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:526)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    Usually it is caused by missing jstl or standard jar. But dm server already has them in repository\bundles\ext folder:

    com.springsource.javax.servlet.jsp.jstl-1.1.2.jar
    com.springsource.javax.servlet.jsp-2.1.0.jar
    com.springsource.javax.servlet-2.5.0.jar
    com.springsource.org.apache.taglibs.standard-1.1.2.jar

    My web.xml version is 2.5:

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    	version="2.5">
    ...
    And my template.mf does import jstl and standard:
    Code:
    Import-Package: javax.servlet.jsp.jstl.core;version="[1.1.2,1.2.0)"
     ,com.springsource.server.web.dm;version="[2.0.0, 3.0.0)"
     ,org.springframework.web.context;version="[3.0, 3.1)"
    Import-Template: org.apache.commons.logging;version="[1.1.1, 2.0.0)"
     ,javax.servlet.http;version="[2.5.0,2.5.0]"
     ,org.springframework.*;version="[3.0,3.1)"
    Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[1.1.2,1.1.2]"
    In Jstl Tag Lib Definitions, it says "JSTL 1.2 should be used for JSP 2.1 containers such Tomcat 6." I'm not sure if that's the problem.

    Thanks for any help.

  • #2
    This is due to a limitation in the OSGi Web Container that prevents it from finding TLDs across bundles. Thankfully, you can work around this limitation by including all the TLDs that you wish to use in your own bundle. We release this isn't a perfect solution, and intend to have support in place for loading TLDs from any bundle to which you are wired before 2.0 is released.

    Comment


    • #3
      Thank you Andy. Glad to know it will be fixed in 2.0 Release.

      Comment


      • #4
        I solved this last issue by copying c.tld to src/main/webapp/META-INF folder and adding tld mapping in web.xml:

        Code:
        	<taglib>
        		<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
        		<taglib-location>/META-INF/c.tld</taglib-location>
        	</taglib>
        Finally finished migrating my project to dm server 2. Thanks for all the help!

        Comment


        • #5
          Originally posted by yuanji View Post
          Finally finished migrating my project to dm server 2. Thanks for all the help!
          Excellent!

          If you're interested in when the workaround is no longer necessary, keep an eye on these two JIRAs: DMS-800 and DMS-801.

          Comment


          • #6
            Hi I believed your problem has already been resolved. I found another solution and will like to share it with anyone who has encountered this same error message while having all the necessary jars in place.

            With reference to the documentations:
            http://java.sun.com/products/jsp/jst...ocs/index.html

            the problem can also be resolved by including the following in your web.xml
            xmlns:c="http://java.sun.com/jsp/jstl/core"
            xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"


            (your web.xml can be found under the WEB-INF folder of your workspace)

            Comment

            Working...
            X