Results 1 to 6 of 6

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

  1. #1
    Join Date
    Jan 2006
    Location
    Edmonton, Alberta, Canada
    Posts
    62

    Default 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. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    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.
    Andy Wilkinson
    SpringSource

  3. #3
    Join Date
    Jan 2006
    Location
    Edmonton, Alberta, Canada
    Posts
    62

    Default

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

  4. #4
    Join Date
    Jan 2006
    Location
    Edmonton, Alberta, Canada
    Posts
    62

    Default

    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!

  5. #5
    Join Date
    Oct 2008
    Posts
    493

    Default

    Quote 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.
    Andy Wilkinson
    SpringSource

  6. #6
    Join Date
    Oct 2009
    Posts
    1

    Default

    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)

Posting Permissions

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