velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claude Brisson" <cla...@renegat.net>
Subject Re: Scope of context ?
Date Thu, 15 Jul 2004 15:23:30 GMT
You don't need to implement the ViewTol interface. Its only purpose is to have the init( )
method called on your object. I'm quite
sure your original classes can be use as-is.

The default scope is the request, but you can specify a <scope> element to the tools
in toolbox.xml,
please check http://jakarta.apache.org/velocity/tools/view/index.html

CloD

----- Original Message ----- 
From: "toto litoto" <mondes_engloutis@yahoo.fr>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Thursday, July 15, 2004 4:36 PM
Subject: Re: Scope of context ?


> Hi,
>
> I understand that to get the advantage of session / request /
> application scope for my object shared between servlet & vm, I need to
> use different objects than the orignal ones that I've coded (simple
> values object). I mean I should  implemente ViewTool interface and
> define properties inside xml file. Is it the only solution ? or may I
> use my simple Value Object and define somewhere that they must be carry
> on the session instead of the request ?
>
>
> Regards and thanks a lot,
> mondes_engloutis.
>
> wh
>
> Claude Brisson wrote:
>
> >Hi.
> >
> >You should use the VelocityViewServlet, from the Tools subproject. The VelocityServlet
is deprecated.
> >The toolbox mechanism provided by the VelocityViewServlet allows 3 different scopes
:
> >http request, http session and application.
> >
> >CloD
> >
> >----- Original Message ----- 
> >From: "toto litoto" <mondes_engloutis@yahoo.fr>
> >To: <velocity-user@jakarta.apache.org>
> >Sent: Thursday, July 15, 2004 12:10 PM
> >Subject: Scope of context ?
> >
> >
> >
> >
> >>Hi,
> >>
> >>I'd like to know the scope of the context in a VelocityServlet. Here it
> >>seems that the scope is the one from HttpRequest. Is it true ?
> >>
> >>I'd really like to have the context as a Session scope. How is it possible ?
> >>
> >>Regards,
> >>mondes_engloutis.
> >>
> >>---------------------------------------------------------------------
> >>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


Mime
View raw message