tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mick Semb Wever <...@apache.org>
Subject Re: Infinite Loop using Regexp in definition
Date Mon, 28 Oct 2013 19:53:07 GMT
ClamAV 0.96.5

> I ran into an infinite loop [snip]
> Basing myself on the example from the
> http://tech.finn.no/2012/07/25/the-ultimate-view-tiles-3/ site, I
> tried to create a REGEXP deinition as follows:
> Given the following tiles.xml definition file:
> <definition name="REGEXP:(.+)" template="/WEB-INF/views/tiles/layouts/default.jsp">
>      <put-attribute name="meta" value="/WEB-INF/views/tiles/{1}/meta.jsp"/>
>      <put-attribute name="head" value="/WEB-INF/views/tiles/{1}/head.jsp"/>
>      <put-attribute name="body" value="/WEB-INF/views/tiles/{1}/body.jsp"/>
> </definition>

We use "REGEXP:([^.]+)\.([^.]+)", and don't come across this behaviour.
But i would think should still cause the problem you describe above.

I wonder if it's because of a custom DefinitionsFactory that skips
anything beginning with "/WEB-INF/"… (see p5 of the article),
Or something else with how our attribute renderers are defined…

Anyway, yes you should make the REGEXP something less greedy!
The article has been updated. There i made it "REGEXP:[^/][^.]*" that is
anything that doesn't start with a slash is considered a definitions


"Everything should be made as simple as possible, but not simpler."
Albert Einstein (William of Ockham) 

| http://github.com/finn-no | http://tech.finn.no |

View raw message