You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alexander Schatten <al...@gmx.at> on 2003/07/29 19:46:45 UTC
Send Parameter from sitemap to XSP
I want to send a parameter from the sitemap to a XSP; similarly like it
would be possible to send a parameter to a XSL stylsheet.
has anyone a simple solution?
thank you!!
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Send Parameter from sitemap to XSP
Posted by Geoff Howard <co...@leverageweb.com>.
Alexander Schatten wrote:
> Bartłomiej Urbański wrote:
>
>>
>> sitemap:
>>
>> <map:generate src="example.xsp" type="serverpages">
>> <map:parameter name="foo" value="bar"/>
>> </map:generate>
>>
>> and xsp:
>>
>> <xsp:logic>
>> String foo = parameters.getParameter("foo", "");
>> </xsp:logic>
>
>
> thank you, this works... unfortunately it still does not solve my
> problem. the point is, that I need an absolute path in XSP to a
> directory of a cocoon project; e.g.:
>
> /usr/cocoon/tomcat/webapps/cocoon/project/upload
>
> and obviously I do not want to hard-code this path; but I found no
> solution to get the first part of the path by any cocoon variable; I
> tried it with the parameter as described above and used the
There is an input module that covers that. See the demos. May only be
in 2.1 but could probably be backported if you're on 2.0.
Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Send Parameter from sitemap to XSP
Posted by Alexander Schatten <al...@gmx.at>.
Bartłomiej Urbański wrote:
>
> sitemap:
>
> <map:generate src="example.xsp" type="serverpages">
> <map:parameter name="foo" value="bar"/>
> </map:generate>
>
> and xsp:
>
> <xsp:logic>
> String foo = parameters.getParameter("foo", "");
> </xsp:logic>
thank you, this works... unfortunately it still does not solve my
problem. the point is, that I need an absolute path in XSP to a
directory of a cocoon project; e.g.:
/usr/cocoon/tomcat/webapps/cocoon/project/upload
and obviously I do not want to hard-code this path; but I found no
solution to get the first part of the path by any cocoon variable; I
tried it with the parameter as described above and used the
context://project/upload
but unfortunately cocoon does not resolve the "context://" but sends the
text as is...
maybe there is another idea to solve this problem?
thank you!!
alex
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Send Parameter from sitemap to XSP
Posted by Bartłomiej Urbański <bu...@netventure.pl>.
Alexander Schatten wrote:
> I want to send a parameter from the sitemap to a XSP; similarly like it
> would be possible to send a parameter to a XSL stylsheet.
>
> has anyone a simple solution?
sitemap:
<map:generate src="example.xsp" type="serverpages">
<map:parameter name="foo" value="bar"/>
</map:generate>
and xsp:
<xsp:logic>
String foo = parameters.getParameter("foo", "");
</xsp:logic>
<xsp:expr>foo</xsp:expr>
best regards
bartek
--
Bartłomiej Urbański
Netventure, http://www.netventure.pl/
ul. Kozłowskiej 1, 00-710 Warszawa
tel.: (0-22) 6519430, fax: (0-22) 6518604
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org