You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Tom Jerry <to...@gmail.com> on 2006/07/12 07:04:49 UTC

pls help on Velocity-servlets

hi... I have a simple servlet and velocity program.. for eg. Sample.java and
email.vm ... and when the vm file is run in a browser, nothing is
displayed.. which means the template is not loaded properly . email.vm is in
pets folder (pets/email.vm) and Sample.class is in pets/WEB-INF/classes
folder. I gave the simple code as :
Template t = getTemplate ("email.vm");

       I am new to Velocity... and while googling, I found that webAppLoader
is the best way to load templates. How to use it ??? And which is the proper
way.. having a velocity.properties file or setting the properties in the
Servlet java file ??? Please guide me.

Regards,
  Snowy

Re: Click and tools (was: Re: pls help on Velocity-servlets)

Posted by Nathan Bubna <nb...@gmail.com>.
That's more the classic VelocityServlet style.  VelocityTools makes it
easy to specify tool scopes, configure tool parameters, and provide
tools access to servlet/velocity engine facilities for those that need
them.  I believe those are the sort of things Claude is hoping for.

On 7/20/06, Malcolm Edgar <ma...@gmail.com> wrote:
> Hi Claude,
>
> I haven't had anyone ask for this yet, or had any need personally.  What
> features out of the Toolbox do you need?
>
> The Click pattern is for users to define a custom Format object which is
> automatically added to the VelocityContext, this class includes a lot of
> formatting options. Much of it inspired by VelocityTools.
>
> If you need more specific stuff out of the toolbox, you would override the
> ClickServlet method createVelocityContext()
>
>
> http://click.sourceforge.net/docs/click-api/net/sf/click/ClickServlet.html#createVelocityContext(net.sf.click.Page)
>
> And add your custom objects:
>
> public CustomClickServlet extends ClickServlet {
>
>    protected VelocityContext *createVelocityContext*(Page
> <http://click.sourceforge.net/docs/click-api/net/sf/click/Page.html>
> page) {
>        VelocityContext context = super.*createVelocityContext*(page);
>
>        context.put("math", new MathTool());
>
>        return context;
>    }
> }
>
>
> regards Malcolm Edgar
>
> On 7/20/06, Claude Brisson <cl...@renegat.net> wrote:
> >
> > Hi.
> >
> > My question is in fact: do you plan to integrate the toolbox.xml
> > mechanism into Click? The aibility to populate the context with standard
> > tools via toolbox.xml is something that Click shouldn't miss. Or maybe
> > is this integration trivial?
> >
> > Thanks,
> >
> >   Claude
> >
> >
> > Le vendredi 14 juillet 2006 à 09:21 +1000, Malcolm Edgar a écrit :
> > > Hi Claude,
> > >
> > > well actually Click does rely on velocity-tools as it uses
> > > org.apache.velocity.tools.view.servlet.WebappLoader for loading Velocity
> > > templates. Click also uses concepts from Velocity Tools with a Format
> > object
> > > used form formatting objects in templates:
> > >
> > >
> > http://click.sourceforge.net/docs/click-api/net/sf/click/util/Format.html
> > >
> > > The scope of the Click Framework is different than Velocity Tools.
> > Velocity
> > > Tools provides a lowerer level library for integrating with other
> > frameworks
> > > and general Velocity development. While Click provides a higher level
> > web
> > > application framework which supports Page and component oriented design,
> > > event based programming model, etc.
> > >
> > > regads Malcolm Edgar
> > >
> > > On 7/14/06, Claude Brisson <cl...@renegat.net> wrote:
> > > >
> > > > Malcolm, do you plan to have Click rely on velocity-tools toolbox
> > sooner
> > > > or later ? Then Click would become really interesting!
> > > >
> > > >   Claude
> > > >
> > > > Le mercredi 12 juillet 2006 à 15:35 +1000, Malcolm Edgar a écrit :
> > > > > <plug>
> > > > > Click Framework is also a good way of using Velocity for web
> > appliations
> > > > > </plug>
> > > > >
> > > > > regards Malcolm Edgar
> > > > > http://click.sourceforge.net
> > > > >
> > > > > On 7/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> > > > > >
> > > > > > Hi Tom,
> > > > > >
> > > > > > You probably want to download the sub project Velocity Tools.  Use
> > the
> > > > > > VelocityViewServlet -- it's the best approach.
> > > > > >
> > > > > > Also, read this article.  It includes a simple tutorial
> > > > > >
> > > > > > http://jakarta.apache.org/velocity/webapps.html
> > > > > >
> > > > > > WILL
> > > > > >
> > > > > >
> > > > > >
> > > > > > Tom Jerry wrote:
> > > > > > > hi... I have a simple servlet and velocity program.. for eg.
> > > > > > > Sample.java and
> > > > > > > email.vm ... and when the vm file is run in a browser, nothing
> > is
> > > > > > > displayed.. which means the template is not loaded properly .
> > > > email.vm
> > > > > > > is in
> > > > > > > pets folder (pets/email.vm) and Sample.class is in
> > > > pets/WEB-INF/classes
> > > > > > > folder. I gave the simple code as :
> > > > > > > Template t = getTemplate ("email.vm");
> > > > > > >
> > > > > > >       I am new to Velocity... and while googling, I found that
> > > > > > > webAppLoader
> > > > > > > is the best way to load templates. How to use it ??? And which
> > is
> > > > the
> > > > > > > proper
> > > > > > > way.. having a velocity.properties file or setting the
> > properties in
> > > > the
> > > > > > > Servlet java file ??? Please guide me.
> > > > > > >
> > > > > > > Regards,
> > > > > > >  Snowy
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > Forio Business Simulations
> > > > > >
> > > > > > Will Glass-Husain
> > > > > > phone (415) 440-7500 x89
> > > > > > mobile (415) 235-4293
> > > > > > wglass@forio.com
> > > > > > www.forio.com
> > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > velocity-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> > velocity-user-help@jakarta.apache.org
> > > > > >
> > > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Click and tools (was: Re: pls help on Velocity-servlets)

Posted by Claude Brisson <cl...@renegat.net>.
Le vendredi 21 juillet 2006 à 09:53 +1000, Malcolm Edgar a écrit :
> Hi Claude,
> 
> I haven't had anyone ask for this yet, or had any need personally.
> What features out of the Toolbox do you need?

The ability to put POJOs into the context for
application/session/request scope in toolbox.xml without writing any
single line of java, as with the VelocityViewServlet.

> The Click pattern is for users to define a custom Format object which
> is automatically added to the VelocityContext, this class includes a
> lot of formatting options. Much of it inspired by VelocityTools. 
> 
> If you need more specific stuff out of the toolbox, you would override
> the ClickServlet method createVelocityContext()

I'm not sure this is sufficient to handle scopes.

I think the way to go is to have the ClickServlet use the
XMLToolboxManager the same way the VelocityViewServlet does. I'm really
too busy to contribute this kind of stuff right now, but since it is a
quite generic feature, I thought you might be interested for Click...

Regards,

  Claude

> 
> http://click.sourceforge.net/docs/click-api/net/sf/click/ClickServlet.html#createVelocityContext(net.sf.click.Page)
> 
> And add your custom objects:
> 
> public CustomClickServlet extends ClickServlet {
>    protected VelocityContext createVelocityContext(
> Page page) {
>        VelocityContext context = super.createVelocityContext(page);
> 
>        context.put("math", new MathTool());
> 
>        return context;
>    }
> }
> 
> regards Malcolm Edgar 
> 
> On 7/20/06, Claude Brisson <cl...@renegat.net> wrote:
>         Hi.
>         
>         My question is in fact: do you plan to integrate the
>         toolbox.xml
>         mechanism into Click? The aibility to populate the context
>         with standard
>         tools via toolbox.xml is something that Click shouldn't miss.
>         Or maybe 
>         is this integration trivial?
>         
>         Thanks,
>         
>           Claude
>         
>         
>         Le vendredi 14 juillet 2006 à 09:21 +1000, Malcolm Edgar a
>         écrit :
>         > Hi Claude,
>         >
>         > well actually Click does rely on velocity-tools as it uses 
>         > org.apache.velocity.tools.view.servlet.WebappLoader for
>         loading Velocity
>         > templates. Click also uses concepts from Velocity Tools with
>         a Format object
>         > used form formatting objects in templates:
>         >
>         >
>         http://click.sourceforge.net/docs/click-api/net/sf/click/util/Format.html
>         >
>         > The scope of the Click Framework is different than Velocity
>         Tools. Velocity 
>         > Tools provides a lowerer level library for integrating with
>         other frameworks
>         > and general Velocity development. While Click provides a
>         higher level web
>         > application framework which supports Page and component
>         oriented design, 
>         > event based programming model, etc.
>         >
>         > regads Malcolm Edgar
>         >
>         > On 7/14/06, Claude Brisson <cl...@renegat.net> wrote:
>         > >
>         > > Malcolm, do you plan to have Click rely on velocity-tools
>         toolbox sooner 
>         > > or later ? Then Click would become really interesting!
>         > >
>         > >   Claude
>         > >
>         > > Le mercredi 12 juillet 2006 à 15:35 +1000, Malcolm Edgar a
>         écrit :
>         > > > <plug> 
>         > > > Click Framework is also a good way of using Velocity for
>         web appliations
>         > > > </plug>
>         > > >
>         > > > regards Malcolm Edgar
>         > > > http://click.sourceforge.net
>         > > >
>         > > > On 7/12/06, Will Glass-Husain <wg...@forio.com> wrote:
>         > > > >
>         > > > > Hi Tom, 
>         > > > >
>         > > > > You probably want to download the sub project Velocity
>         Tools.  Use the
>         > > > > VelocityViewServlet -- it's the best approach.
>         > > > >
>         > > > > Also, read this article.  It includes a simple
>         tutorial 
>         > > > >
>         > > > > http://jakarta.apache.org/velocity/webapps.html
>         > > > >
>         > > > > WILL
>         > > > > 
>         > > > >
>         > > > >
>         > > > > Tom Jerry wrote:
>         > > > > > hi... I have a simple servlet and velocity program..
>         for eg.
>         > > > > > Sample.java and
>         > > > > > email.vm ... and when the vm file is run in a
>         browser, nothing is
>         > > > > > displayed.. which means the template is not loaded
>         properly .
>         > > email.vm
>         > > > > > is in 
>         > > > > > pets folder (pets/email.vm) and Sample.class is in
>         > > pets/WEB-INF/classes
>         > > > > > folder. I gave the simple code as :
>         > > > > > Template t = getTemplate (" email.vm");
>         > > > > >
>         > > > > >       I am new to Velocity... and while googling, I
>         found that
>         > > > > > webAppLoader
>         > > > > > is the best way to load templates. How to use it ???
>         And which is 
>         > > the
>         > > > > > proper
>         > > > > > way.. having a velocity.properties file or setting
>         the properties in
>         > > the
>         > > > > > Servlet java file ??? Please guide me. 
>         > > > > >
>         > > > > > Regards,
>         > > > > >  Snowy
>         > > > > >
>         > > > >
>         > > > > --
>         > > > > Forio Business Simulations 
>         > > > >
>         > > > > Will Glass-Husain
>         > > > > phone (415) 440-7500 x89
>         > > > > mobile (415) 235-4293
>         > > > > wglass@forio.com
>         > > > > www.forio.com
>         > > > >
>         > > > >
>         > > > >
>         ---------------------------------------------------------------------
>         > > > > To unsubscribe, e-mail:
>         velocity-user-unsubscribe@jakarta.apache.org
>         > > > > For additional commands, e-mail:
>         velocity-user-help@jakarta.apache.org
>         > > > >
>         > > > >
>         > >
>         > >
>         > >
>         ---------------------------------------------------------------------
>         > > To unsubscribe, e-mail:
>         velocity-user-unsubscribe@jakarta.apache.org
>         > > For additional commands, e-mail:
>         velocity-user-help@jakarta.apache.org
>         > >
>         > >
>         
>         
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail:
>         velocity-user-unsubscribe@jakarta.apache.org
>         For additional commands, e-mail:
>         velocity-user-help@jakarta.apache.org
>         
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Click and tools (was: Re: pls help on Velocity-servlets)

Posted by Malcolm Edgar <ma...@gmail.com>.
Hi Claude,

I haven't had anyone ask for this yet, or had any need personally.  What
features out of the Toolbox do you need?

The Click pattern is for users to define a custom Format object which is
automatically added to the VelocityContext, this class includes a lot of
formatting options. Much of it inspired by VelocityTools.

If you need more specific stuff out of the toolbox, you would override the
ClickServlet method createVelocityContext()


http://click.sourceforge.net/docs/click-api/net/sf/click/ClickServlet.html#createVelocityContext(net.sf.click.Page)

And add your custom objects:

public CustomClickServlet extends ClickServlet {

   protected VelocityContext *createVelocityContext*(Page
<http://click.sourceforge.net/docs/click-api/net/sf/click/Page.html>
page) {
       VelocityContext context = super.*createVelocityContext*(page);

       context.put("math", new MathTool());

       return context;
   }
}


regards Malcolm Edgar

On 7/20/06, Claude Brisson <cl...@renegat.net> wrote:
>
> Hi.
>
> My question is in fact: do you plan to integrate the toolbox.xml
> mechanism into Click? The aibility to populate the context with standard
> tools via toolbox.xml is something that Click shouldn't miss. Or maybe
> is this integration trivial?
>
> Thanks,
>
>   Claude
>
>
> Le vendredi 14 juillet 2006 à 09:21 +1000, Malcolm Edgar a écrit :
> > Hi Claude,
> >
> > well actually Click does rely on velocity-tools as it uses
> > org.apache.velocity.tools.view.servlet.WebappLoader for loading Velocity
> > templates. Click also uses concepts from Velocity Tools with a Format
> object
> > used form formatting objects in templates:
> >
> >
> http://click.sourceforge.net/docs/click-api/net/sf/click/util/Format.html
> >
> > The scope of the Click Framework is different than Velocity Tools.
> Velocity
> > Tools provides a lowerer level library for integrating with other
> frameworks
> > and general Velocity development. While Click provides a higher level
> web
> > application framework which supports Page and component oriented design,
> > event based programming model, etc.
> >
> > regads Malcolm Edgar
> >
> > On 7/14/06, Claude Brisson <cl...@renegat.net> wrote:
> > >
> > > Malcolm, do you plan to have Click rely on velocity-tools toolbox
> sooner
> > > or later ? Then Click would become really interesting!
> > >
> > >   Claude
> > >
> > > Le mercredi 12 juillet 2006 à 15:35 +1000, Malcolm Edgar a écrit :
> > > > <plug>
> > > > Click Framework is also a good way of using Velocity for web
> appliations
> > > > </plug>
> > > >
> > > > regards Malcolm Edgar
> > > > http://click.sourceforge.net
> > > >
> > > > On 7/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> > > > >
> > > > > Hi Tom,
> > > > >
> > > > > You probably want to download the sub project Velocity Tools.  Use
> the
> > > > > VelocityViewServlet -- it's the best approach.
> > > > >
> > > > > Also, read this article.  It includes a simple tutorial
> > > > >
> > > > > http://jakarta.apache.org/velocity/webapps.html
> > > > >
> > > > > WILL
> > > > >
> > > > >
> > > > >
> > > > > Tom Jerry wrote:
> > > > > > hi... I have a simple servlet and velocity program.. for eg.
> > > > > > Sample.java and
> > > > > > email.vm ... and when the vm file is run in a browser, nothing
> is
> > > > > > displayed.. which means the template is not loaded properly .
> > > email.vm
> > > > > > is in
> > > > > > pets folder (pets/email.vm) and Sample.class is in
> > > pets/WEB-INF/classes
> > > > > > folder. I gave the simple code as :
> > > > > > Template t = getTemplate ("email.vm");
> > > > > >
> > > > > >       I am new to Velocity... and while googling, I found that
> > > > > > webAppLoader
> > > > > > is the best way to load templates. How to use it ??? And which
> is
> > > the
> > > > > > proper
> > > > > > way.. having a velocity.properties file or setting the
> properties in
> > > the
> > > > > > Servlet java file ??? Please guide me.
> > > > > >
> > > > > > Regards,
> > > > > >  Snowy
> > > > > >
> > > > >
> > > > > --
> > > > > Forio Business Simulations
> > > > >
> > > > > Will Glass-Husain
> > > > > phone (415) 440-7500 x89
> > > > > mobile (415) 235-4293
> > > > > wglass@forio.com
> > > > > www.forio.com
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> velocity-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> velocity-user-help@jakarta.apache.org
> > > > >
> > > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

Click and tools (was: Re: pls help on Velocity-servlets)

Posted by Claude Brisson <cl...@renegat.net>.
Hi.

My question is in fact: do you plan to integrate the toolbox.xml
mechanism into Click? The aibility to populate the context with standard
tools via toolbox.xml is something that Click shouldn't miss. Or maybe
is this integration trivial?

Thanks,

  Claude


Le vendredi 14 juillet 2006 à 09:21 +1000, Malcolm Edgar a écrit :
> Hi Claude,
> 
> well actually Click does rely on velocity-tools as it uses
> org.apache.velocity.tools.view.servlet.WebappLoader for loading Velocity
> templates. Click also uses concepts from Velocity Tools with a Format object
> used form formatting objects in templates:
> 
>   http://click.sourceforge.net/docs/click-api/net/sf/click/util/Format.html
> 
> The scope of the Click Framework is different than Velocity Tools. Velocity
> Tools provides a lowerer level library for integrating with other frameworks
> and general Velocity development. While Click provides a higher level web
> application framework which supports Page and component oriented design,
> event based programming model, etc.
> 
> regads Malcolm Edgar
> 
> On 7/14/06, Claude Brisson <cl...@renegat.net> wrote:
> >
> > Malcolm, do you plan to have Click rely on velocity-tools toolbox sooner
> > or later ? Then Click would become really interesting!
> >
> >   Claude
> >
> > Le mercredi 12 juillet 2006 à 15:35 +1000, Malcolm Edgar a écrit :
> > > <plug>
> > > Click Framework is also a good way of using Velocity for web appliations
> > > </plug>
> > >
> > > regards Malcolm Edgar
> > > http://click.sourceforge.net
> > >
> > > On 7/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> > > >
> > > > Hi Tom,
> > > >
> > > > You probably want to download the sub project Velocity Tools.  Use the
> > > > VelocityViewServlet -- it's the best approach.
> > > >
> > > > Also, read this article.  It includes a simple tutorial
> > > >
> > > > http://jakarta.apache.org/velocity/webapps.html
> > > >
> > > > WILL
> > > >
> > > >
> > > >
> > > > Tom Jerry wrote:
> > > > > hi... I have a simple servlet and velocity program.. for eg.
> > > > > Sample.java and
> > > > > email.vm ... and when the vm file is run in a browser, nothing is
> > > > > displayed.. which means the template is not loaded properly .
> > email.vm
> > > > > is in
> > > > > pets folder (pets/email.vm) and Sample.class is in
> > pets/WEB-INF/classes
> > > > > folder. I gave the simple code as :
> > > > > Template t = getTemplate ("email.vm");
> > > > >
> > > > >       I am new to Velocity... and while googling, I found that
> > > > > webAppLoader
> > > > > is the best way to load templates. How to use it ??? And which is
> > the
> > > > > proper
> > > > > way.. having a velocity.properties file or setting the properties in
> > the
> > > > > Servlet java file ??? Please guide me.
> > > > >
> > > > > Regards,
> > > > >  Snowy
> > > > >
> > > >
> > > > --
> > > > Forio Business Simulations
> > > >
> > > > Will Glass-Husain
> > > > phone (415) 440-7500 x89
> > > > mobile (415) 235-4293
> > > > wglass@forio.com
> > > > www.forio.com
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> > > >
> > > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: pls help on Velocity-servlets

Posted by Malcolm Edgar <ma...@gmail.com>.
Hi Claude,

well actually Click does rely on velocity-tools as it uses
org.apache.velocity.tools.view.servlet.WebappLoader for loading Velocity
templates. Click also uses concepts from Velocity Tools with a Format object
used form formatting objects in templates:

  http://click.sourceforge.net/docs/click-api/net/sf/click/util/Format.html

The scope of the Click Framework is different than Velocity Tools. Velocity
Tools provides a lowerer level library for integrating with other frameworks
and general Velocity development. While Click provides a higher level web
application framework which supports Page and component oriented design,
event based programming model, etc.

regads Malcolm Edgar

On 7/14/06, Claude Brisson <cl...@renegat.net> wrote:
>
> Malcolm, do you plan to have Click rely on velocity-tools toolbox sooner
> or later ? Then Click would become really interesting!
>
>   Claude
>
> Le mercredi 12 juillet 2006 à 15:35 +1000, Malcolm Edgar a écrit :
> > <plug>
> > Click Framework is also a good way of using Velocity for web appliations
> > </plug>
> >
> > regards Malcolm Edgar
> > http://click.sourceforge.net
> >
> > On 7/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> > >
> > > Hi Tom,
> > >
> > > You probably want to download the sub project Velocity Tools.  Use the
> > > VelocityViewServlet -- it's the best approach.
> > >
> > > Also, read this article.  It includes a simple tutorial
> > >
> > > http://jakarta.apache.org/velocity/webapps.html
> > >
> > > WILL
> > >
> > >
> > >
> > > Tom Jerry wrote:
> > > > hi... I have a simple servlet and velocity program.. for eg.
> > > > Sample.java and
> > > > email.vm ... and when the vm file is run in a browser, nothing is
> > > > displayed.. which means the template is not loaded properly .
> email.vm
> > > > is in
> > > > pets folder (pets/email.vm) and Sample.class is in
> pets/WEB-INF/classes
> > > > folder. I gave the simple code as :
> > > > Template t = getTemplate ("email.vm");
> > > >
> > > >       I am new to Velocity... and while googling, I found that
> > > > webAppLoader
> > > > is the best way to load templates. How to use it ??? And which is
> the
> > > > proper
> > > > way.. having a velocity.properties file or setting the properties in
> the
> > > > Servlet java file ??? Please guide me.
> > > >
> > > > Regards,
> > > >  Snowy
> > > >
> > >
> > > --
> > > Forio Business Simulations
> > >
> > > Will Glass-Husain
> > > phone (415) 440-7500 x89
> > > mobile (415) 235-4293
> > > wglass@forio.com
> > > www.forio.com
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

Re: pls help on Velocity-servlets

Posted by Claude Brisson <cl...@renegat.net>.
Malcolm, do you plan to have Click rely on velocity-tools toolbox sooner
or later ? Then Click would become really interesting!

  Claude

Le mercredi 12 juillet 2006 à 15:35 +1000, Malcolm Edgar a écrit :
> <plug>
> Click Framework is also a good way of using Velocity for web appliations
> </plug>
> 
> regards Malcolm Edgar
> http://click.sourceforge.net
> 
> On 7/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> >
> > Hi Tom,
> >
> > You probably want to download the sub project Velocity Tools.  Use the
> > VelocityViewServlet -- it's the best approach.
> >
> > Also, read this article.  It includes a simple tutorial
> >
> > http://jakarta.apache.org/velocity/webapps.html
> >
> > WILL
> >
> >
> >
> > Tom Jerry wrote:
> > > hi... I have a simple servlet and velocity program.. for eg.
> > > Sample.java and
> > > email.vm ... and when the vm file is run in a browser, nothing is
> > > displayed.. which means the template is not loaded properly . email.vm
> > > is in
> > > pets folder (pets/email.vm) and Sample.class is in pets/WEB-INF/classes
> > > folder. I gave the simple code as :
> > > Template t = getTemplate ("email.vm");
> > >
> > >       I am new to Velocity... and while googling, I found that
> > > webAppLoader
> > > is the best way to load templates. How to use it ??? And which is the
> > > proper
> > > way.. having a velocity.properties file or setting the properties in the
> > > Servlet java file ??? Please guide me.
> > >
> > > Regards,
> > >  Snowy
> > >
> >
> > --
> > Forio Business Simulations
> >
> > Will Glass-Husain
> > phone (415) 440-7500 x89
> > mobile (415) 235-4293
> > wglass@forio.com
> > www.forio.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: pls help on Velocity-servlets

Posted by Malcolm Edgar <ma...@gmail.com>.
<plug>
Click Framework is also a good way of using Velocity for web appliations
</plug>

regards Malcolm Edgar
http://click.sourceforge.net

On 7/12/06, Will Glass-Husain <wg...@forio.com> wrote:
>
> Hi Tom,
>
> You probably want to download the sub project Velocity Tools.  Use the
> VelocityViewServlet -- it's the best approach.
>
> Also, read this article.  It includes a simple tutorial
>
> http://jakarta.apache.org/velocity/webapps.html
>
> WILL
>
>
>
> Tom Jerry wrote:
> > hi... I have a simple servlet and velocity program.. for eg.
> > Sample.java and
> > email.vm ... and when the vm file is run in a browser, nothing is
> > displayed.. which means the template is not loaded properly . email.vm
> > is in
> > pets folder (pets/email.vm) and Sample.class is in pets/WEB-INF/classes
> > folder. I gave the simple code as :
> > Template t = getTemplate ("email.vm");
> >
> >       I am new to Velocity... and while googling, I found that
> > webAppLoader
> > is the best way to load templates. How to use it ??? And which is the
> > proper
> > way.. having a velocity.properties file or setting the properties in the
> > Servlet java file ??? Please guide me.
> >
> > Regards,
> >  Snowy
> >
>
> --
> Forio Business Simulations
>
> Will Glass-Husain
> phone (415) 440-7500 x89
> mobile (415) 235-4293
> wglass@forio.com
> www.forio.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

Re: pls help on Velocity-servlets

Posted by Will Glass-Husain <wg...@forio.com>.
Hi Tom,

You probably want to download the sub project Velocity Tools.  Use the 
VelocityViewServlet -- it's the best approach. 

Also, read this article.  It includes a simple tutorial

http://jakarta.apache.org/velocity/webapps.html

WILL



Tom Jerry wrote:
> hi... I have a simple servlet and velocity program.. for eg. 
> Sample.java and
> email.vm ... and when the vm file is run in a browser, nothing is
> displayed.. which means the template is not loaded properly . email.vm 
> is in
> pets folder (pets/email.vm) and Sample.class is in pets/WEB-INF/classes
> folder. I gave the simple code as :
> Template t = getTemplate ("email.vm");
>
>       I am new to Velocity... and while googling, I found that 
> webAppLoader
> is the best way to load templates. How to use it ??? And which is the 
> proper
> way.. having a velocity.properties file or setting the properties in the
> Servlet java file ??? Please guide me.
>
> Regards,
>  Snowy
>

-- 
Forio Business Simulations

Will Glass-Husain
phone (415) 440-7500 x89
mobile (415) 235-4293
wglass@forio.com
www.forio.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org