cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yuryx <yu...@mobicomk.donpac.ru>
Subject Re: session variables
Date Thu, 08 Aug 2002 06:33:37 GMT
amit@astronomica.as.arizona.edu wrote:

>Hi,
>
>  I got a problem of maintaining session variables in cocoon. My 
>problems are as follows :
>
>1)Can I get variables in a sitemap from XSP ? For example,
>
><map:match pattern="**/dynamic.xsp">
>	<map:parameter name="variable" value="getparameter(name)" />
>
Try to  define the sitemap parameter in your action and set the 
parameter value from session's object (in your action).
Like:

    Request request = (Request) 
objectModel.get(Constants.REQUEST_OBJECT);   
    Session session =  request.getSession(true);
   
    sitemapParams.put("name",new 
String((String)session.getAttribute("name")));
    return sitemapParams;

   in sitemap:

<map:transform src="stylesheets/dynamic-page2html.xsl">
       <map:parameter name="view-source" value={name}/>
</map:transform>


Regards.
Yury.

>
>Where getparameter is an imaginary method for getting a parameter "name"
>from "dynamic.xsp".
>
>2)Can I then use this variable to pass it to a stylesheet? For example,
>
><map:transform src="stylesheets/dynamic-page2html.xsl">
>       <map:parameter name="view-source" value=$variable/>
></map:transform>
>
>Thanks..
>
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>
>  
>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message