You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Antonio Petrelli (JIRA)" <ji...@apache.org> on 2009/09/14 09:22:33 UTC

[jira] Issue Comment Edited: (TILES-340) Wildcards and some combinations of locale fails to find definition

    [ https://issues.apache.org/struts/browse/TILES-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46739#action_46739 ] 

Antonio Petrelli edited comment on TILES-340 at 9/14/09 12:21 AM:
------------------------------------------------------------------

The bug still existed, but now it is fixed. The problem was that the definition map was used both to be resolved for inheritance and to be passed to higher levels of locale.
The latter case needed the "raw", i.e. "unresolved" definitions.
Before resolving the inheritance, the definitions are copied and passed along.
Added test cases to avoid that this bug will reincarnate again (I hope :-D ).

      was (Author: brenmcguire):
    The bug still existed, but not it is fixed. The problem was that the definition map was used both to be resolved for inheritance and to be passed to higher levels of locale.
The latter case needed the "raw", i.e. "unresolved" definitions.
Before resolving the inheritance, the definitions are copied and passed along.
Added test cases to avoid that this bug will reincarnate again (I hope :-D ).
  
> Wildcards and some combinations of locale fails to find definition
> ------------------------------------------------------------------
>
>                 Key: TILES-340
>                 URL: https://issues.apache.org/struts/browse/TILES-340
>             Project: Tiles
>          Issue Type: Bug
>    Affects Versions: 2.1.0, 2.1.3, 2.2.0
>         Environment: Glassfish v2, Spring 2.5, Linux (opensuse 11)
>            Reporter: Christian Ihle
>            Assignee: Antonio Petrelli
>             Fix For: 2.1.4, 2.2.0
>
>         Attachments: TilesTest-0.1.war, TilesTest.tar.gz, TilesTest.tar.gz
>
>
> I have the following definition:
> {code}
> <definition name="standardLayout" template="/WEB-INF/layouts/standard.jspx" />
> <definition name="*/*" extends="standardLayout">
>         <put-attribute name="body" value="/WEB-INF/jspx/{1}/{2}.jspx" />
> </definition>
> {code}
> So I set Firefox to use English/United States [en-us] and open a page that matches the wildcard. This works fine. Then I change the language setting in Firefox to English [en], and open the same page. Then I get an exception:
> {noformat}
> Dec 10, 2008 9:52:10 AM org.apache.tiles.impl.BasicTilesContainer render
> WARNING: Unable to find the definition 'hjem/start'
> Dec 10, 2008 9:52:10 AM org.apache.tiles.impl.BasicTilesContainer render
> WARNING: Unable to find the definition 'feil/500'
> Dec 10, 2008 9:52:10 AM org.apache.catalina.core.StandardWrapperValve log
> SEVERE: StandardWrapperValve[tiles]: PWC1406: Servlet.service() for servlet tiles threw exception
> org.apache.tiles.definition.NoSuchDefinitionException: feil/500
> 	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:612)
> 	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:307)
> 	at org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:75)
> 	at org.springframework.js.ajax.tiles2.AjaxTilesView.renderMergedOutputModel(AjaxTilesView.java:108)
> 	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257)
> 	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1183)
> 	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:902)
> 	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
> 	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
> 	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> 	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
> 	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
> 	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> 	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> 	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
> 	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> 	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
> 	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> 	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> 	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
> 	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
> 	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
> 	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
> 	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
> 	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
> 	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
> 	at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> 	at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
> {noformat}
> This works the same with other languages that has sub-languages as well. Like Spanish/Chile [es-cl] works, and Spanish [es] fails. German/Germany [de-de] works, German [de] fails.
> But: if I do this the other way around, it works! Open the page with English [en] works, then I open with  English/United States [en-us] and it works too. Very strange.
> And if I don't use wildcards for the definition, then it works no matter what. With Tiles 2.1.0 and 2.0.6.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.