You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Thomas Fahrmeyer <th...@fahrmeyer.de> on 2002/09/07 16:13:45 UTC

Velocity Taglib and access to current request object

Hi,

i've just installed the Velocity Taglib to integrate velocity into JSP
pages. I'm wondering how can I access the current request and response
object to perform the URL encoding. I've tried a lot of things but didn't
get it to work

What i wanna have is

<vel:velocity>
	<a href="$response.encodeURL("/path")">Link </a>
</vel:velocity>

How can i get this to work ?

Thanx
Thomas


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


AW: Velocity Taglib and access to current request object

Posted by Thomas Fahrmeyer <th...@fahrmeyer.de>.
Hi,

see inline ...
>
> On 9/7/02 10:13 AM, "Thomas Fahrmeyer" <th...@fahrmeyer.de> wrote:
>
> > Hi,
> >
> > i've just installed the Velocity Taglib to integrate velocity into JSP
> > pages. I'm wondering how can I access the current request and response
> > object to perform the URL encoding. I've tried a lot of things
> but didn't
> > get it to work
> >
> > What i wanna have is
> >
> > <vel:velocity>
> > <a href="$response.encodeURL("/path")">Link </a>
> > </vel:velocity>
> >
> > How can i get this to work ?
>
> We can add it.  I'm a little loathe to choose the referent
> ('response') that
> is used, but maybe we can add it as a parameter somewhere or have some
> attrib way of doing it :
>
>
>  <vel:velocity response="response">
>
>
> Or something...

Why can we not putting all the explicit objects accessible in a JSP-Page
into the context as well? But your approach with the parameter is ok. I need
it, because I have no chance to encode the URL with some kind of tools.

Thanx
Thomas

>
>
> --
> Geir Magnusson Jr.
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity Taglib and access to current request object

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 9/7/02 10:13 AM, "Thomas Fahrmeyer" <th...@fahrmeyer.de> wrote:

> Hi,
> 
> i've just installed the Velocity Taglib to integrate velocity into JSP
> pages. I'm wondering how can I access the current request and response
> object to perform the URL encoding. I've tried a lot of things but didn't
> get it to work
> 
> What i wanna have is
> 
> <vel:velocity>
> <a href="$response.encodeURL("/path")">Link </a>
> </vel:velocity>
> 
> How can i get this to work ?

We can add it.  I'm a little loathe to choose the referent ('response') that
is used, but maybe we can add it as a parameter somewhere or have some
attrib way of doing it :


 <vel:velocity response="response">


Or something...

    
-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>