cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: RE: [XSP] Sitemap parameter passed to XSP page
Date Tue, 19 Mar 2002 16:56:42 GMT
> From: Baer Peter [mailto:Peter.Baer@nbg.sbs.de]
> 
> We need a way to push parameters from the sitemap to XSP via a
generator
> (of type serverpages).
> 
> We can catch session and request parameters using
session.getParameter()
>   or request.getParameter(). With parameters.getParameter() we had no
> success, however. Nothing happens using the following configuration.
> 
> Any suggestions most appreciated!
> 
> 
> Our sitemap looks like this:
> 
> <map:match pattern="application/*">
>    <map:generate type="serverpages" src="record.xsp">
>      <map:parameter name="user_name" value="admin"/>
>    </map:generate>
> </map:match>
> 
> 
> Our XSP file looks like:
> 
> <xsp:logic>
> try {
> String myParam = parameters.getParameter("user_name");
> }
> catch (Exception e)
> { }
> </xsp:logic>

Where you have this <xp:logic> tag? In what part of XSP? You must know
that the all <xsp:logic> tags right after <xsp:page> goes to class
definition, not the XSP body.

That's working for me:

<page xmlns:cinclude="http://apache.org/cocoon/include/1.0">

  <body> <!-- NOTE: Document root tag here!!!! -->
    <xsp:logic>
      try{
        String color = parameters.getParameter("color");


Vadim



> 
> 
> We also tried this:
> 
> <parameters:get-parameter name="user_name"/>
> 
> Regards
> 	Peter
> 

...


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.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