The servlet extends the  VelocityServlet
And the handleRequest( method is the following.

public Template handleRequest( HttpServletRequest request,
   HttpServletResponse response, Context ctx )
....


I don't think that the request response and servlet context are put in the velocity context though.
Carlo




Felix Satyaputra wrote:
Hi Carlo,

Is this servlet extended from VelocityServlet in
velocity tools project?

http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tools/view/servlet/VelocityViewServlet.html

This servlet puts request, session, & servlet context
(I think) inside velocity context for every request.

Your servlet (if it's custom build) can do the same
thing - put request & session in velocity context.
Then store the vector in session.

Assuming session is stored under the key 'session' in
velocity context, to use from velocity,

#set ($myVector =
$session.getAttribute('myVectorAttribute'))

A little work around, I guess...

Cheers,

Felix


--- Carlo Torniai <[EMAIL PROTECTED]> wrote:

Hi there.
I'm using a servlet to build some vectors that are
used by a velocity template.
I call the same servlet with different parameters
and I would like to keep the value of vectors stored in the context according to some parameters value.
But i found that every time i call the servlet the
vectors has to be populated and added to the context.
The question is: how can I add vectors to the
context so that they can be persistent (i.e. no need to populate them and to add them to the context every time the servlet is called) during a
user session?
Thanks
Carlo






---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]





        
        
                
___________________________________________________________ All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to