cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <>
Subject Re: Parameters between Action and XSP
Date Tue, 20 Jul 2004 13:56:38 GMT
Carlos Duque wrote:

> Hello, I'm developing a application under cocoon. My question is to mark 
> a "best practices" in my work.
> How I pass parameters between Action and XSP? Which are the best option?
> I know:
>     -session
>     -request.setParameter
> It's possible with Map returned? with response?

I would recommend the following:

public Map act(...) {
     Map result = new HashMap();
     result.put("foo", value);
     return result;

<map:act type="...">
   <map:generate type="xsp" src="...">
     <map:parameter name="foo" value="{foo}"/>

XSP: String foo = parameters.getParameter(foo);

This way you have a separation between parameter names in action
and XSP and see what happens in the sitemap.

-- Andreas

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

View raw message