Jetty
  1. Jetty
  2. JETTY-1490

NPE in TagLibraryInfoImpl createTagFileInfo

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 8.0.4
    • Fix Version/s: None
    • Component/s: JSP
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      Description

      If you deploy a web exploded application with a TLD to a tag-file you will get a NPE, because the jarFileUrl argument is "null".

      The NPE will occur on:

      private TagFileInfo createTagFileInfo(TreeNode elem, String uri, URL jarFileUrl) throws JasperException

      { ... ctxt.getTagFileJarUrls().put(path, jarFileUrl); ... }

      where the second "jarFileUrl" cannot be NULL when putting it onto the hashmap.

      Also see the tomcat patch over at:
      http://tomcat.10.n6.nabble.com/svn-commit-r492263-tomcat-jasper-tc5-5-x-src-share-org-apache-jasper-compiler-TagLibraryInfoImpl-java-td2219260.html

      This is a shameless copy/paste of the patch:
      if (path.startsWith("/META-INF/tags")) {
      // Tag file packaged in JAR

      ctxt.getTagFileJarUrls().put(path, jarFileUrl);
      + // check if jarFileUrl is not null before adding it, or this will
      + // cause a NPE.
      + if (jarFileUrl != null)

      { + ctxt.getTagFileJarUrls().put(path, jarFileUrl); + }

      } else if (!path.startsWith("/WEB-INF/tags"))

      { err.jspError("jsp.error.tagfile.illegalPath", path); }

      Also tracking this over at glassfish:
      http://java.net/jira/browse/GLASSFISH-18391

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Jan Bartel
            Reporter:
            Marc Vanbrabant
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: