Tomasz Nazar wrote:

On the next beautiful day: Fri, 29 July, 2005, Dave Newton wrote:
Yes, you can use multiple wildcards: my "solution" has two wildcard mappings (to the same action):

   <!-- Admin table CRUD actions requiring a parameter/id. -->
   <action path="/Admin/*/*/*"
           type="actions.AdminCrud"
           name="adminForm"
           parameter="needId"
     <forward name="tableOk"   path="/WEB-INF/jsp/crud_{1}_{2}.jsp"/>
     <forward name="tableBad"  path="/WEB-INF/jsp/tableBad.jsp"/>
   </action>
One more question: I don't see how would you pass two parameters into
the action. Can you tell?
Yeah, but you won't like it ;)

In the AdminCrud action I manually pick apart the URL and create 'table', 'command', and 'id' values that I pass to the command handlers.

Basically I'm using the wildcard mapping only to get to my action; the rest isn't automatic.

And is the url really pretty without '?' at the end?
Yep.

I did something similar to implement cnn.com-like urls (year/month/day/article-identifier that could use either the article ID or a unique article string identifier using much the same method, too.

Dave

Reply via email to