Re: URL patterns
Scott Farquhar <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.devel |
|---|---|
| Message-ID | <[email protected]> |
Mihai, The URL decorator mappers works on the servlet part of the URL, not the parameter parts. If you want to work on parameters, use the parameterdecoratormapper. Cheers, Scott Mihai Purcarea wrote: > Hy, > > I work with JSP&Struts on JBoss platform. For the add/edit actions over > an item (product, user) The interfaces are parssed by the sitemesh > decorator. I have an interface with a menu on the left of the page. For > the view action I want a simple interface without a menu in a popup > window, so a different decorator to utilize. The URL-s are the followings: > > http://192.168.2.121:8080/forum-ejb/thecity/user.do?action=edit&userId=id1 > <http://192.168.2.121:8080/forum-ejb/thecity/user.do?action=edit&userId=id1> > http://192.168.2.121:8080/forum-ejb/thecity/user.do?action=view&userId=id1 > <http://192.168.2.121:8080/forum-ejb/thecity/user.do?action=view&userId=id1> > > So there is a single Struts action with the action parameter of > different values. In decorators.xml I have defined the following patterns: > > <decorators defaultdir="/jsp/decorators"> > <decorator name="thecity.viewUser" page="thecity/empty.jsp"> > > <pattern>/thecity/user.do?action=view*</pattern> <!--doesen't work--> > <pattern>/thecity/user.do*view*</pattern> <!--doesen't work--> > </decorator> > <decorator name="thecity.user" page="thecity/user.jsp"> > <pattern>/thecity/user.do</pattern> > </decorator> > <decorator name="thecity" page="thecity/default.jsp"> > <pattern>/thecity/*</pattern> > </decorator> > </decorators> > > I have tryed in 2 ways but doesen't seem to work. How should I solve > this dilemma? I do not want to make a different action for the view > action. Thanks. > > Mihai -- ATLASSIAN - http://www.atlassian.com Expert J2EE Software, Services and Support ------------------------------------------------------- Need a simple, powerful way to track and manage issues? Try JIRA - http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0