[jboss-jira] [JBoss JIRA] (JBWEB-237) Use of File.toURL causes failures using JSP taglibs when path contains a space

Remy Maucherat (JIRA) jira-events at lists.jboss.org
Wed Apr 11 08:04:47 EDT 2012


    [ https://issues.jboss.org/browse/JBWEB-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682990#comment-12682990 ] 

Remy Maucherat commented on JBWEB-237:
--------------------------------------

The patch would likely cause more problems than what it would fix (the hack use of URL.getFile, in particular, would probably be impacted), so I don't think it should be applied. Similarly, I have no plans to make the change in trunk either.

It is a big issue if changes have been introduced in EAP that force a cascade of risky changes, the update should be reworked probably.
                
> Use of File.toURL causes failures using JSP taglibs when path contains a space
> ------------------------------------------------------------------------------
>
>                 Key: JBWEB-237
>                 URL: https://issues.jboss.org/browse/JBWEB-237
>             Project: JBoss Web
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: JBossWeb-2.1.12.GA
>            Reporter: James Livingston
>            Assignee: Remy Maucherat
>         Attachments: jbossweb-filetourl.diff
>
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list