Tomasz Nazar wrote:
But Laurie, do you know if it is possible to use those wildcards so they
can rewrite patterns to include more parameters?
/context/department/*/employee/*/view
->
/context/employee/view.do?departmentOID={1}&employeeOID={2}
Will struts handle that properly? I doubt if that's possible, cause in
this case I need to pass two parameters to the action.
<action
path="/department/*/employee/*"
???="??? {1} ??? {2}"
>
Yes, you can use multiple wildcards: my "solution" has two wildcard
mappings (to the same action):
<!-- Admin table CRUD actions that require no parameter/id. -->
<action path="/Admin/*/*"
type="actions.AdminCrud"
name="adminForm"
parameter="noId"
scope="request"
validate="false">
<forward name="list" path="/do/Admin/{1}/List" redirect="true"/>
<forward name="tableOk" path="/WEB-INF/jsp/crud_{1}_{2}.jsp"/>
<forward name="tableBad" path="/WEB-INF/jsp/tableBad.jsp"/>
<forward name="actionBad" path="/WEB-INF/jsp/actionBad.jsp"/>
</action>
<!-- Admin table CRUD actions requiring a parameter/id. -->
<action path="/Admin/*/*/*"
type="actions.AdminCrud"
name="adminForm"
parameter="needId"
scope="request"
validate="false">
<forward name="list" path="/do/Admin/{1}/List" redirect="true"/>
<forward name="tableOk" path="/WEB-INF/jsp/crud_{1}_{2}.jsp"/>
<forward name="tableBad" path="/WEB-INF/jsp/tableBad.jsp"/>
<forward name="actionBad" path="/WEB-INF/jsp/actionBad.jsp"/>
</action>
(This is from a very prototype-y version; it doesn't look like that now,
although it ain't much better ;)
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]