struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Götz (JIRA) <j...@apache.org>
Subject [jira] [Created] (WW-4679) Tiles-Plugin unable to load tiles definition XML
Date Wed, 24 Aug 2016 08:23:21 GMT
Sebastian Götz created WW-4679:
----------------------------------

             Summary: 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


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)

Mime
View raw message