You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jon Evans <jo...@misgl.com> on 2004/06/04 18:15:59 UTC

jx cocoon.request

Hi,

I've got a pipeline that uses sendmail to mail the user a "forgot 
password" message.

In it there is (supposed to be) a hyperlink back to the site.  However 
I can't find the magic incantation to get request.getServerName() into 
my template.

I've tried:
${cocoon.request.serverName}
${cocoon.request.servername}
${cocoon.request.getServerName()}

etc. etc.

${cocoon.request.contentType} works, this is the only instance of 
${cocoon.request I could find in the source (using grep).

I'll need scheme and port as well in order to cover all eventualities.

Any ideas?

Cheers,

Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: jx cocoon.request

Posted by Jon Evans <jo...@misgl.com>.
Hi Joerg,

On 4 Jun 2004, at 17:24, Joerg Heinicke wrote:

> On 04.06.2004 18:15, Jon Evans wrote:
> > In it there is (supposed to be) a hyperlink back to the site.  
> However I
> > can't find the magic incantation to get request.getServerName() into 
> my
> > template.
>

> The FOM does not provide every method of the servlet API, but there 
> have
> been threads about it:
>  http://marc.theaimsgroup.com/?t=107996583500001&r=1&w=4
> http://marc.theaimsgroup.com/?t=108569302600005&r=1&w=4
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108583707603472&w=4
>
> Alan could not get the discussion started on dev list with his mail. If
> you add your comment too, maybe you get it.

Thanks for the links.  It seems I'm not the only one to be frustrated 
by the subset of objects available.

I've worked around my problem for now by using the request: input 
module to pass the data into flow, which then passes it out again to 
the jx template.

    <map:parameter name="scheme" value="{request:scheme}"/>
    <map:parameter name="serverName" value="{request:serverName}"/>
    <map:parameter name="serverPort" value="{request:serverPort}"/>

It's probably a better solution actually, as the function I've written 
in flow only puts the port in the URL if port!=80.

Thanks again,

Jon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: jx cocoon.request

Posted by Joerg Heinicke <jo...@gmx.de>.
On 04.06.2004 18:15, Jon Evans wrote:

> Hi,
> 
> I've got a pipeline that uses sendmail to mail the user a "forgot 
> password" message.
> 
> In it there is (supposed to be) a hyperlink back to the site.  However I 
> can't find the magic incantation to get request.getServerName() into my 
> template.
> 
> I've tried:
> ${cocoon.request.serverName}
> ${cocoon.request.servername}
> ${cocoon.request.getServerName()}
> 
> etc. etc.
> 
> ${cocoon.request.contentType} works, this is the only instance of 
> ${cocoon.request I could find in the source (using grep).
> 
> I'll need scheme and port as well in order to cover all eventualities.
> 
> Any ideas?

The FOM does not provide every method of the servlet API, but there have 
been threads about it:
http://marc.theaimsgroup.com/?t=107996583500001&r=1&w=4
http://marc.theaimsgroup.com/?t=108569302600005&r=1&w=4
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108583707603472&w=4

Alan could not get the discussion started on dev list with his mail. If 
you add your comment too, maybe you get it.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org