----- Original Message ----- 
> From: "James Courtney" <[EMAIL PROTECTED]>
>

> Can action1 store the value of myParam1 in the session in such a way that
template3 can retrieve it without the aid > of inserting an action between
template2 and template3?

Hi James,

    There are many possibilities for what you intend to do. First, take a
look at this page from the Wiki:


http://wiki.opensymphony.com/comments/Application%2C+Session%2C+Request+objects+in+vm

    You will see that Velocity can access the request object through $req
and the response object through $res. You can then easily obtain Session and
Application (ServletContext) objects like this:

    #set ($ses = $req.getSession())
    #set ($app = $ses.getServletContext())


    To send myParam1 from template2 to template3 you can store in the
session with $ses.setAttribute() or send it through the request object,
either via <form action="template3"><input name="myParam1"
value="..."></form><a href="javascript:document.forms[0].submit()">GO!</a>
or via <a href="template3?myParam1=...">GO!</a>.

Hope it helps,

Vítor Souza



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to