Patrick and I talked about doing that, however, we came up against several roadblocks:

 1. How would you handle nested packages?  For example: /foo/bar/joe?
 2. How would you handle action methods?
 3. The case might not always match

One possible solution would be to introduce "wildcard modifiers" that would let you modify the wildcard-matched value. For example, in problem #3, you would want to have "foo/bar" used for the action class "com.acme.{1}.{2}". You could apply a modifier like so - "com.acme.{1}.{2|capitalize}" - which would capitalize the Action name. The idea from these modifiers comes from Javascript Templates [1].

The modifiers could solve problems 3 and maybe 1 ("com.acme.{1|slashesToDots}.{2|capitalize}"), and perhaps #2 could be solved by using the "!" separator instead of the "/" again.

However, the question must be raised whether these improvements obscure the somewhat advanced wildcard capability. There is a danger in being too fancy for your own good, resulting in a feature that is perceived as too complicated and detrimental to the framework. Whether that applies here is up for discussion.

Don

Ted Husted wrote:
On 8/2/06, Patrick Lightbody <[EMAIL PROTECTED]> wrote:
Classes named FooAction map to the action named "foo"
Paths come from sub-packages inside of com.acme.actions. Ex:
com.acme.actions.foo.BarAction -> /foo/bar

If we conform the case, and drop the "Action" suffix, this turns into
a very clean wildcard expression:

* <action name="*/*" class="com.acme.{1}.{2}">

So the action reference for "whatever.foo.Bar" would be "/foo/Bar"


Results map to the same directory path with the addition of "-success"

If we use the packages for folder names, and the class names for page
names, then we could use another clean wilcard expression.

* <result>/{1}/{2}.jsp</result>

So, the nominal result for the foo.Bar action would be /foo/Bar.jsp.

We could consider providing some wildcard defaults in the default
package, which people could then tweak and override as needed.

-T.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to