use servlet-name instead of url-pattern with struts
Martin <[email protected]> Wed, 18 May 2005 06:43:48 CDT
| Newsgroups | gmane.comp.web.sitemesh.general |
|---|---|
| Message-ID | <14168815.1116416680532.JavaMail.os-j2ee@opensymphony01.contegix.com> |
Hi, Most examples seem to specify the following web.xml configuration: <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> But I noticed that all browser requests, even secondary requests for images contained in pages cause the filter to be invoked, which obviously did no decoration in those instances. I am using struts and all my requests go through the struts action servlet so I suggest use of the following would elliminate redundant calls to sitemesh when secondary files (mainly images) are being requested: <filter-mapping> <filter-name>sitemesh</filter-name> <servlet-name>action</servlet-name> </filter-mapping> Regards Martin --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=2325&messageID=6785#6785 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]