[ 
https://issues.apache.org/jira/browse/WW-4679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15496534#comment-15496534
 ] 

Hudson commented on WW-4679:
----------------------------

SUCCESS: Integrated in Jenkins build Struts-JDK7-master #526 (See 
[https://builds.apache.org/job/Struts-JDK7-master/526/])
WW-4679 Handles empty space in path (lukaszlenart: rev 
c570a2b2bda34632760f69e84c3877a6004c855b)
* (edit) 
plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsWildcardServletApplicationContext.java


> Tiles-Plugin unable to load tiles definition XML
> ------------------------------------------------
>
>                 Key: WW-4679
>                 URL: https://issues.apache.org/jira/browse/WW-4679
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tiles
>    Affects Versions: 2.5.2
>         Environment: Microsoft Windows 7
> Oracle JDK 1.8.0_101
> Apache Tomcat 8.0.20
>            Reporter: Sebastian Götz
>             Fix For: 2.5.3
>
>
> We recently upgraded to struts 2.5.2. Now we have the problem that tiles is 
> trying to load any tiles*.xml resource on the classpath for definitions, 
> which is actually great.
> The problem occurs when the absolute path to the definitions contains spaces. 
> For example _C:/Program Files/.../webapps/context/WEB-INF/classes/tiles.xml_.
> This causes:
> {noformat}
> java.net.URISyntaxException: Illegal character in path at index 18: 
> file:///C:/Program Files/.../webapps/context/WEB-INF/classes/tiles.xml
>         at java.net.URI$Parser.fail(URI.java:2848)
>         at java.net.URI$Parser.checkChars(URI.java:3021)
>         at java.net.URI$Parser.parseHierarchical(URI.java:3105)
>         at java.net.URI$Parser.parse(URI.java:3053)
>         at java.net.URI.<init>(URI.java:588)
>         at java.net.URI.create(URI.java:850)
>         ... 84 more
> {noformat}
> This exception is thrown at
> {noformat}
> at java.net.URI.create(URI.java:852)
>         at 
> org.apache.struts2.tiles.StrutsWildcardServletApplicationContext.getResource(StrutsWildcardServletApplicationContext.java:105)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:232)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:225)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadRawDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:225)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromResources(CachingLocaleUrlDefinitionDAO.java:203)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:192)
>         at 
> org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitions(ResolvingLocaleUrlDefinitionDAO.java:68)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:174)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:131)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:105)
>         at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:49)
>         at 
> org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:89)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:286)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.isValidDefinition(BasicTilesContainer.java:273)
>         at 
> org.apache.tiles.TilesContainerWrapper.isValidDefinition(TilesContainerWrapper.java:88)
>         at 
> org.apache.tiles.impl.mgmt.CachingTilesContainer.isValidDefinition(CachingTilesContainer.java:100)
>         at 
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:139)
>         at 
> org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208)
>         at 
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:366)
>         at 
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:270)
> {noformat}
> Looks like the spaces should be escaped with %20 maybe.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to