Uploaded image for project: 'JBoss Web'
  1. JBoss Web
  2. JBWEB-237

Use of File.toURL causes failures using JSP taglibs when path contains a space

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: JBossWeb-2.1.12.GA
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1) Install JBoss EAP 5.1.2 to a location with a space in the path
      2) Deploy a web application with any jar in WEB-INF/lib/, and a index.jsp which contains a taglib import, e.g.
      <%@ taglib uri="http://z.com/z" prefix="z"%>
      3) Go to the page for the JSP

      Show
      1) Install JBoss EAP 5.1.2 to a location with a space in the path 2) Deploy a web application with any jar in WEB-INF/lib/, and a index.jsp which contains a taglib import, e.g. <%@ taglib uri="http://z.com/z" prefix="z"%> 3) Go to the page for the JSP
    • Workaround Description:
      Hide

      Install JBoss to a location not containing a space

      Show
      Install JBoss to a location not containing a space

      Description

      org.apache.catalina.core.ApplicationContext.getResource() uses File.toURL(), which is deprecated in favour of File.toURI().toURL() because it does not escape characters correctly. With the FileURLConnection changes in EAP 5.1.2, this causes failures in the JSP taglib handling code if JBoss is installed into a path containing a space.

      java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Program Files/EnterprisePlatform-5.1.2/jboss-eap-5.1/jboss-as/server/ECARSPre/tmp/4naks-ed1hk0-gzfuvex8-1-gzfuw630-bu/ecp.war/WEB-INF/lib/ojdbc6.jar
      at java.net.URI$Parser.fail(Unknown Source)
      at java.net.URI$Parser.checkChars(Unknown Source)
      at java.net.URI$Parser.parseHierarchical(Unknown Source)
      at java.net.URI$Parser.parse(Unknown Source)
      at java.net.URI.<init>(Unknown Source)
      at java.net.URL.toURI(Unknown Source)
      at org.jboss.net.protocol.file.FileURLConnection.<init>(FileURLConnection.java:62)
      at org.jboss.net.protocol.file.Handler.openConnection(Handler.java:40)
      at java.net.URL.openConnection(Unknown Source)
      at org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:266)
      at org.jboss.web.tomcat.service.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
      at org.jboss.web.tomcat.service.jasper.TagLibCache.init(TagLibCache.java:101)
      at org.jboss.web.tomcat.service.jasper.TagLibCache.getLocation(TagLibCache.java:83)
      at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:549)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rmaucher Remy Maucherat
                  Reporter:
                  jameslivingston James Livingston
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated: