velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Glass-Husain" <>
Subject Re: Velocity JSP help
Date Thu, 14 Jul 2005 17:35:06 GMT
Actually, not quite.

Velocity needs a servlet to take web requests, fill up a context with 
"references" (that can be used within the page) and display the Velocity 

This is simpler than it sounds.  The Velocity Tools subproject provides 
VelocityViewServlet, which does most of this for you automatically.  You can 
define standard references in an XML file, or subclass VelocityViewServlet 
to add more functionality.  (that's what I think you'd need to do in this 

Read this article for more info.  (As a side note: we just wrote it - it's 
intended to help the new Velocity user make sense of the options for web 
applications.  Let us know if it's useful).

Best, WILL

P.S.  I suggest you respond to the "velocity-user" list instead of 
"velocity-dev", which is intended for discussion on "how to use Velocity".

----- Original Message ----- 
From: "Rob Ratner" <>
To: "Velocity Developers List" <>
Sent: Thursday, July 14, 2005 10:27 AM
Subject: Re: Velocity JSP help

> Thanks Will, I am new to Velocity, but can embed Java in a Velocity 
> template similar to JSPs with such a simple task for my web page?
> Thanks
> Rob
> Will Glass-Husain <> wrote:
> The easiest way is to populate a list with a range of years in your 
> servlet,
> then pass the list in as a reference in the context.
> ----- Original Message ----- 
> From: "Rob Ratner"
> To:
> Sent: Thursday, July 14, 2005 8:58 AM
> Subject: Velocity JSP help
>> Hello all. Does any know how to do the following in a Velocity Template.
>> Dynamically figure out the current year and set up a drop down with a
>> certain range of years to be shown in the drop down field.
>> Thanks a ton.
>> ---------------------------------
>> Start your day with Yahoo! - make it your home page
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message