If the one and only goal is getting Struts to use Velocity templates,
then, yes, a VelocityAction is going work every bit as well as a
VelocityServlet. And maybe that's the way to go. A developer could
choose to either extend it, or maybe just forward to a base
VelocityAction that did what the VelServlet is trying to do. Both
approaches could probably be supported at once.

But, if it were me, I'd first think in terms of a VelocityServlet that
is designed to answer from a URI, and create a chained VelocityContext
from a request/session/application contexts. 

Then, I would subsubclass that into a VelocityActionServlet that knew
about the Struts resources. (If that part were actually needed.)

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Incze Lajos wrote:
> 
> > Typically, the View Helper is another servlet, but there's no reason why
> > it couldn't be another Action. (After all, the dispatchers are typically
> > servlets too.)
> ...
> > > <Donnie comment>
> > > I agree with that to the extent that the view will be in another servlet,
> > > which means in the vast majority of cases. My primary concern with overuse
> > > of the contexts is in things not directly related to the request / session
> > > itself.
> > > </Donnie comment>
> >
> 
> I've never understood this claim. As I see a servlet is a processing unit
> of an HTTP request/response turn. You want to isolate a servlet if the
> iprocessing unit is directly callable from the HTTP connection. There is
> no any other structural feature in the servlet over a simple subroutine call
> to a view. Even you have to work some to put everything into the request
> that could be available otherwise. I can't see any benefit in declaring
> that the viewer helper is another servlet if it was not actvatable directly
> from outside by an URL. Am I missing something?
> 
> incze

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

Reply via email to