I think with the use of set tag in the JSTL you can do that, by passing some required values to the attributed used with the set tag.
And to get the value you can use out tag .
Yep i have done that using
<jstl:set var="" value=""/>
Yeah exactly and even you can set the scope session, request etc using the scope attribute and i think its default value is " page ".