oh.  heh.  it would have to be something more complicated like that. 
well, here's what i know:

VelocityServlet is deprecated, and the VelocityViewServlet what most
people use for Velocity integration with Struts (seeing as it is part
of VelocityStruts).  I'm guessing since you didn't like my first
suggestion there is some exceptional reason you must use the
VelocityServlet and not the VelocityViewServlet, right?

the big add of the VVS is that it can automatically add the
VelocityStruts tools to the context.  VelocityServlet doesn't have
toolbox support like that, so you would have to add the VelocityStruts
tools (and initialize them) your self.  this, of course, still means
you must depend on the VelocityTools project.  so, hopefully that's
not a problem.  anyway, the steps you'll need to take should be
something along the lines of:

- override VelocityServlet.createContext()
- instead of creating a plain VelocityContext, create a ChainedContext
(part of VelocityTools)
- create instances of the VelocityStruts tools you need (e.g. StrutsLinkTool)
- pass the ChainedContext instance to the tools' init(Object) methods
- add the tools to the ChainedContext
- return the ChainedContext

if for some reason you can't use VelocityTools, all i can recommend is
that you mimic what the class above would do in your own code.

On 10/14/05, Stas Ostapenko <[EMAIL PROTECTED]> wrote:
> Hello Nathan !
>
> Google is not so helpful when you try to answer my question. As you
> maybe pointed out (or not ?) that i'm not asking about velocity+struts
> integration, but VelocityServlet+struts.
>
> Thanks for help.
> On 10/14/05, Nathan Bubna <[EMAIL PROTECTED]> wrote:
> > google is helpful. ;-)
> > http://www.google.com/search?q=velocity+struts
> >
> > On 10/14/05, Stas Ostapenko <[EMAIL PROTECTED]> wrote:
> > > Hi !
> > >
> > > I'm looking for VelocityServlet and Struts integration. Is there any ?
> > > It's not diffcult to implement, but how about ready-to-use thing ?
> > >
> > > ---------------------------------------------------------------------
> > > 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]
> >
> >
>
> ---------------------------------------------------------------------
> 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