Re: decorators.xml troubles
Joe Walnes <[email protected]>
| Newsgroups | gmane.comp.web.sitemesh.general |
|---|---|
| Message-ID | <[email protected]> |
On Apr 11, 2005 2:39 PM, Torgeir Veimo <[email protected]> wrote: > I have the following decorators.xml file; > > <?xml version="1.0" encoding="ISO-8859-1"?> > > <decorators defaultdir="/decorators"> > <excludes> > <pattern>/login*</pattern> > <pattern>/logout*</pattern> > </excludes> > > <decorator name="none"> > <pattern>/pages/admin/help/*</pattern> > </decorator> > > <decorator name="member2" page="member2.jsp"> > <pattern>/pages*</pattern> > </decorator> > > <decorator name="member" page="member.jsp"> > <pattern>/*</pattern> > </decorator> > > <decorator name="raw" page="raw.jsp"/> > </decorators> > > Yet, the page with url > > http://localhost:8080/main/pages/admin/help/doc479.xml > > is decorated by the member2 decorator. (Both Sitemesh 2.1 and 2.2.1). Okay, you've stumped me, dude. I can't seem to replicate this. Is the root of your web-app context http://localhost:8080/main/ ? > What are the order rules for decorator matching? First it tries to find an exact match. (e.g. something that doesnt contain wildcard chars). If that fails, it then looks for all patterns that match that contain wildcards (* or ?). Out of all these matches, the longest one wins (as this is the most explicit). So /a/b/* beats /a/*. Finally, it falls back to the /* pattern. -Joe --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]