URL patterns

"Mihai Purcarea" <[email protected]>
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <[email protected]>
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=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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.