Hi -- this really helped.  Ok, now I understand how the Velocity 
initialization occurs.  It appears that VelocityView Servlet doesn't allow 
for a user-specified properties file, to override settings or say, redirect 
its logging file (from the server log).  It is not really documented, and 
relies on other supporting classes like Toolbox and ChainedContext and 
WebAppLoader, which are also not documented.  Gosh, what really is this 
Toolbox all about?

What I did was pull out what seemed to be the bare essentials, and added it 
to an initialization servlet of my own making.

Maverick comes up ok now, I see the Velocity log output where I want it, 
meaning that it was initialized by my servlet.  There is only one problem: 
velocity is not processing the pages, so I just see the unprocessed 
velocity templates in the browser.

I have a small question for now:  How does Maverick decide which template 
processor to use to transform files?  I understand that Velocity is being 
initialized, but how is Maverick "connected" to it?  Does Maverick base 
it's decision on filename extensions?  Is there only one transform 
capability supported at a time?

Thanks,
Dan


At 07:59 AM 2/14/02 -0800, you wrote:
>Maverick 2.0 uses the approach developed by the Velocity folk to
>integrate with Struts.  It's a servlet called VelocityViewServlet that
>makes Velocity work just like JSP:  You configure *.vm to map to this
>servlet, and the servlet masquerades the normal servlet attribute
>collections as the Velocity context.
>
>Velocity initialization, properties, logs, etc are configured on the
>VelocityViewServlet itself, not the Maverick dispatcher (like it was in
>1.0).  Take a look at friendbook-velocity's web.xml deployment
>descriptor.  It's in the opt-velocity package.  This package also
>includes a somewhat outdated copy of the VelocityViewServlet.  I'll
>update it for the b2 release.
>
>BTW, it's entirely possible (and quite easy) to write a Maverick view
>factory that builds "native" Velocity views.  It's just convenient to
>piggyback on the Struts integration effort and use our "document" view
>and transform types.
>
>Jeff Schnitzer
>[EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Dan Finkelstein [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 14, 2002 11:50 AM
> > To: [EMAIL PROTECTED]
> > Subject: [Mav-user] Velocity initialization? Velocity Logs?
> >
> > Hi --
> >
> > I'm trying to see why my velocity logs aren't showing up where I
>expect
> > them to.  I have a velocity.properties file, which I have located in
>the
> > WEB-INF directory.  Also, in web.xml, I have the init lines for the
> > dispatcher:
> >
> >       <init-param>
> >               <param-name>velocityProperties</param-name>
> >               <param-value>WEB-INF/velocity.properties</param-value>
> >       </init-param>
> >
> > I have a log file where I see all the Maverick output and that works
>just
> > fine.
> >
> > Also, I've searched high and low in the maverick code for the
> > initialization for velocityProperties.  I can find it in the older Mav
>1.0
> > code, but I can't locate it in the Mav 2.0 code.  In fact, I can't
>even
> > find the Velocity.init() call ... I must be missing something!!!
> >
> > If you could explain the process by which Maverick requests velocity
>to
> > initialize itself that would be great!!
> >
> > Dan
> >
> >
> > _______________________________________________
> > Mav-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/mav-user
>
>_______________________________________________
>Mav-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/mav-user


_______________________________________________
Mav-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mav-user

Reply via email to