Multiple URL Patterns
Kyle Adams <[email protected]> Fri, 02 Sep 2005 14:10:51 CDT
| Newsgroups | gmane.comp.web.sitemesh.general,gmane.comp.lang.pnuts.user |
|---|---|
| Message-ID | <24625621.1125688281547.JavaMail.os-j2ee@opensymphony01.contegix.com> |
I've searched through this forum a couple of times, as well as browsed the Sitemesh web site, but I'm still struggling with some basic stuff, I'm running up against a deadline, and I'm a SiteMesh noob :-) We have an app that uses <%@ include file="..."/> to do templating. I'd like to begin a slow migration to SiteMesh, beginning with some new screens. That means the typical example of <pattern>/*</pattern> from decorators.xml won't work for me. 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. --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=6385&messageID=14388#14388 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]