You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Will Glass-Husain <wg...@forio.com> on 2005/07/14 19:35:06 UTC
Re: Velocity JSP help
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
page.
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
case).
http://jakarta.apache.org/velocity/tools/
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).
http://jakarta.apache.org/velocity/webapps.html
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" <pr...@yahoo.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
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 <wg...@forio.com> 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.
>
> WILL
>
> ----- 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: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org