cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Arnold <Jac...@envworld.com>
Subject RE: Trouble Passing Parameters
Date Tue, 07 Jan 2003 16:47:15 GMT
That worked. Thanks for the help.

J


-----Original Message-----
From: Michael Wechner [mailto:michael.wechner@wyona.org]
Sent: Tuesday, January 07, 2003 9:44 AM
To: cocoon-users@xml.apache.org
Subject: Re: Trouble Passing Parameters


Jacob Arnold wrote:
> I'm having difficulty passing parameters to my XSP. I'm using the
following
> in my sitemap:
> 
> <map:match pattern="*/test.html">
>   <map:generate src="docs/test.xsp" type="serverpages">
>     <map:parameter name="id" value="{1}"/>
>   </map:generate>
>   <map:transform src="stylesheets/encode-html.xsl"/>
>   <map:serialize/>
> </map:match>
> 
> And this in my XSP
> 
> <xsp-request:get-parameter name="id"/>
> 
> But the value is not showing up. When I try the code suggested in the
> matchers and selectors doc,
> <xsp:expr>parameters.getParameter("id")</xsp:expr> I get this error:

Try something like

<xsp:page>

<my_root_element>
<xsp:logic>
   String my_param=parameters.getParameter("id","default_value");
</xsp:logic>
</my_root_element>
</xsp:page>

HTH

Michael


> 
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> test_xsp: Line 373, column 71: unreported exception:
> org.apache.avalon.framework.parameters.ParameterException; must be caught
or
> declared to be thrown Line 0, column 0: 1 error
> 
> Any ideas? I'm using Cocoon 2.0.4 and Tomcat 4.1.12. I tried putting the
> <map:parameter> element within my transform, but that didn't seem to work
> either.
> 
> Thanks,
> J
> 
> ---------------------------------------------------------------------
> 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>

---------------------------------------------------------------------
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