More seriously this time, =:-|

Maybe instead of hardcoding *.do and /do in the ActionForwards, we
should be telling the ActionForward whether a path is an action or not. 

<forward 
name="SomeAction"
path="/someAction"
action="true"
/>

Then getPath() would return /do/someAction or /someAction.do, as
appropriate. 

If action were false, it would just return the path verbatim, as in 1.0.

Likewise, the ActionForward could know that its part of a module, and
what its module-prefix is. (The controller could set this property
automatically.) 

So given the equivalent of 

<forward 
name="SomeAction"
path="/someAction"
action="true"
module-prefix="module1"
context-prefix="/do"
context-suffix=""
/>

The ActionForward could return 

/do/module1/someAction 

given the same thing but changing

context-prefix=""
context-suffix=".do"

the ActionForward could return 

/module1/someAction.do 

If it were not an action, and were a page, it could return 

/module1/someAction.jsp

To give people a leg-up on the WEB-INF issues, there could be
page-prefix attribute

<forward 
name="SomeAction"
path="/someAction"
action="true"
module-prefix="module1"
context-prefix=""
context-suffix=".do"
page-prefix="/WEB-INF"
/>

that would result in something like

/WEB-INF/module1/someAction.jsp

The "WEB-INF" variation might be a standard deviation, as we do with
ActionMappings (session vs request).

If people want to get weirder than that, they could do their own
ActionForward subclass, since the path rendering would now be pluggable.


-- Ted Husted, Husted dot Com, Fairport NY US
-- Java Web Development with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

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

Reply via email to