cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Steuck <>
Subject sitemap to xsp map:parameters passing
Date Thu, 27 Sep 2001 20:20:37 GMT

Thank you for creating such an elegant and versatile product. I am
learning it and have some questions. I would be very grateful if
somebody could help me out.

I'm using cocoon_20_branch as of today with java full version "J2RE
1.3.0 IBM build cx130-20010626" on RedHat 7.1. I'm having a problem
passing parameters from sitemap into an xsp. Here's the relevant
sitemap element:

<map:match pattern="docs/project_list">
  <map:generate type="serverpages" src="project_list.xsp">
    <map:parameter name="detail_page" value="edit_project"/>
  <map:transform src="stylesheets/simple-page2html.xsl"/>


Now in project_list.xsp, I'm trying to access this parameter as
presrcibed in


Page won't compile now:

java.lang.reflect.InvocationTargetException: org.apache.cocoon.ProcessingException: Language
Exception: org.apache.cocoon.components.language.LanguageException: Error compiling project_list_xsp:
Line 462, column 61:  Exception org.apache.avalon.framework.parameters.ParameterException
must be caught, or it must be declared in the throws clause of this method.
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(
	at org.apache.cocoon.generation.ServerPagesGenerator.setup(
	at org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(
	at org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(
	at org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(
	at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(
	at org.apache.cocoon.www.greg.sitemap_xmap.resource_dynamic_page(

Ok, knowing that there's xsp:logic, I'm building a catch block around
the offending parameters.getParameter:

String detail_page = "BAD";
try {
   detail_page = parameters.getParameter("detail_page");
} catch (org.apache.avalon.framework.parameters.ParameterException e) {
  detail_page = "EXCEPTION";

Now the page compiles, but execution yields:
org.apache.avalon.framework.parameters.ParameterException: The parameter 'detail_page' does
not contain a value

Am I completely misunderstanding the concept of parameter passing from
sitemap into xsp? Or is there a different way to pass data from
sitemap into xsp? I know that I can use request, but it seems to be
gross misuse of it and will have security implications too.


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message