Hi, thanks for the answer, this is exactly what I need, but I can't seem to get it to
work...
I got the input modules defined in the cocoon.xconf :
<input-modules>
<component-instance
class="org.apache.cocoon.components.modules.input.RequestModule"
logger="core.modules.input" name="request"/>
<component-instance
class="org.apache.cocoon.components.modules.input.SessionModule"
logger="core.modules.input" name="session"/>
<component-instance
class="org.apache.cocoon.components.modules.input.RequestParameterModule"
logger="core.modules.input" name="request-param"/>
<component-instance
class="org.apache.cocoon.components.modules.input.RequestAttributeModule"
logger="core.modules.input" name="request-attr"/>
<component-instance
class="org.apache.cocoon.components.modules.input.HeaderAttributeModule"
logger="core.modules.input" name="request-header"/>
... etc.
And in the sitemap I try to use the param as follows :
<map:transform type="ftp-put">
<!-- required -->
<map:parameter name="host"
value="localhost"/>
<map:parameter name="username"
value="test"/>
<map:parameter name="password"
value="test"/>
<map:parameter name="filenameFrom"
value="{request-attr:filename}"/>
<map:parameter name="filenameTo"
value="{request-attr:filename}"/>
<!-- not required -->
<map:parameter name="errortag"
value="error"/>
</map:transform>
The parameters filenameFrom and filenameTo are still empty in the ftp transformer...
Is there anything I'm missing here ?
>>> [EMAIL PROTECTED] 07/28/03 04:15pm >>>
Hi Geert,
Have you looked into input modules -- you can be using
sytax like:
<map:parameter name="username"
value="{request:username}"/>
Cheers,
-Alex
--- Geert Van Damme <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm writing an action to make request attributes
> available to the sitemap (like the
> RequestParamAction does for request parameters)
>
> Problem is in the action the attributes don't seem
> to be available ???
> Sitemap looks like follows :
>
> <map:act type="env">
> <map:parameter
> name="accor.bestellingen.local.filename"
> value="localfilename"/>
>
> <map:transform type="filewriter">
> <map:parameter name="filename"
> value="{localfilename}"/>
> </map:transform>
> </map:act>
>
> <map:act type="request-attributes">
> <map:transform type="ftp-put">
> <!-- required -->
> <map:parameter name="host"
> value="localhost"/>
> <map:parameter name="username"
> value="test"/>
> <map:parameter name="password"
> value="test"/>
> <map:parameter name="filenameFrom"
> value="{filename}"/>
> <map:parameter name="filenameTo"
> value="{filename}"/>
>
> <!-- not required -->
> <map:parameter name="errortag"
> value="error"/>
> </map:transform>
> </map:act>
>
> The filewriter (= custom transformer, doesn't
> matter) puts an attribute on the request.
> In the ftp-put transformer, I can get back the
> correct value from the request attribute, but would
> rather have the action making the attribute(s)
> available to the sitemap.
>
> Following code returns null in the action :
> HttpRequest request =
>
(HttpRequest)ObjectModelHelper.getRequest(objectModel);
> System.out.println ("attribute filename = " +
> request.getAttribute ("filename"));
> while the same code in the Transformer returns the
> (correct) previously set value...
>
> Any ideas ??
>
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]