Struts 1.0 isn't designed to permit multiple ActionServlets. Unless
you've made some alterations, there may be threading problems. 

Struts 1.1 does speak to the issues you raise, but we are all still
getting our heads around it, and trying to put some documentation
together. 

I was also just thinking about trying something like what Nick
describes, but in the context of localization or "browserization", but
it could work the same as roles. But I'm thinking along the lines of
getting the ActionMapping and ActionForwards do the work. 

What I'm thinking about is using an ActionMapping subclass as an
ActionForward factory. When calling findMapping, you could also pass the
request. It would then return a new ActionForward, that would know how
to amend the path according to something in the request or session. Like
the locale, or maybe a role object. 

It would then work like Nick described. Instead of just going to
/pages/some.jsp, it could go to /pages/fr/some.jsp or pages/zh/some.jsp.
Or in your case /pages/manager/some.jsp or /pages/clerk/some.jsp. If
some paths could be changed, and others couldn't, there might be a
marker in the path, like /pages/{0}some.jsp, for the ones that could be
merged.

Still at the thinking stage though. 

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



"Press, Michael" wrote:
> 
> I want to have multiple workflows, with users mapped to a particular
> workflow based on their role.  I know that Struts doesn't support this now.
> Is there an intent to support this in the future?
> 
> In the meantime, I'm interested in suggestions on the best way to implement
> this.
> 
> Right now, I've done this:
>    1) I've created multiple ActionServlets, each of which reads it's own
> struts-config file.  Each pair is the workflow for one role.
>    2)  I've got a RoleDispatcherServlet that intercepts all Struts URLs,
> converts the URL to call the appropriate ActionServlet for the user's role,
> and forwards to that URL.
> 
> Any additional suggestions or alternative methods are appreciated.
> 
> Michael
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

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

Reply via email to