Re: Multiple URL Patterns
Scott Farquhar <[email protected]> Mon, 5 Sep 2005 08:56:41 +1000
| Newsgroups | gmane.comp.web.sitemesh.general,gmane.comp.lang.pnuts.user |
|---|---|
| Message-ID | <[email protected]> |
Kyle, On Fri, Sep 02, 2005 at 02:10:51PM -0500, Kyle Adams wrote: > I've tried explicitly calling out the new screens like below: > > <decorators> > <decorator name="default" page="default.jsp"> > <pattern>/screen1.do</pattern> > <pattern>/screen2.do</pattern> > </decorator> > </decorators> > > No luck--I get the undecorated page back. If I copy the same pattern over into web.xml, my screens are decorated properly: > > <filter-mapping> > <filter-name>sitemesh</filter-name> > <url-pattern>/screen1.do</url-pattern> > </filter-mapping> > > We're using (as can be seen in the URL) SiteMesh in conjunction with Struts, so a typical URL for the new screens looks something like: > > http://localhost/myWebApp/screen1.do?field1=something&field2=somethingElse > > So... what am I missing here? Another question: is explicitly calling out the URLs for the SiteMesh-enabled pages the best way to handle this problem? The PageDecoratorMapper, with its ability to check a page's metadata, looked pretty interesting. Which application server are you using? On some application servers, sitemesh needs to be mapped to the 'view' page, not the controller. Cheers, Scott --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]