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