> From: Baer Peter [mailto:[EMAIL PROTECTED]] > > 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>