You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Torgeir Veimo <to...@vertech.no> on 2001/03/21 14:58:37 UTC

URLEncoder taglib

I'm about to create a small taglib that does the same as
java.net.URLEncoder, eg. like 
<url:encode>text to be encoded</url:encode>.

But do anyone of you know of any similar taglib that does the same, to
save me some work?

-- 
- Torgeir

Re: URLEncoder taglib

Posted by Ted Husted <hu...@apache.org>.
Is this the same functionality provided by
HttpServletResponse.encodeURL()?

If so, the Struts html:link tag does this type of encoding. The
operative line of code is

results.append(response.encodeURL(BeanUtils.filter(hyperlink)));

The call to BeanUtils.filter is actually deprecated, and just calls 

return (ResponseUtils.filter(value));

Torgeir Veimo wrote:
> 
> I'm about to create a small taglib that does the same as
> java.net.URLEncoder, eg. like
> <url:encode>text to be encoded</url:encode>.
> 
> But do anyone of you know of any similar taglib that does the same, to
> save me some work?
> 
> --
> - Torgeir

Re: URLEncoder taglib

Posted by Torgeir Veimo <to...@vertech.no>.
Maya Muchnik wrote:
> 
> See the book: O'Reily "Java servlet programming" or "Web development with
> JavaServer Pages" by D. Fields, M. Kolb.
> 

Thanx for the response. I implemented that taglib anyway, and since it
was my first taglib ever, it was a nice exercise. :) 

-- 
- Torgeir

Re: URLEncoder taglib

Posted by Maya Muchnik <mm...@pumatech.com>.
See the book: O'Reily "Java servlet programming" or "Web development with
JavaServer Pages" by D. Fields, M. Kolb.

Torgeir Veimo wrote:

> I'm about to create a small taglib that does the same as
> java.net.URLEncoder, eg. like
> <url:encode>text to be encoded</url:encode>.
>
> But do anyone of you know of any similar taglib that does the same, to
> save me some work?
>
> --
> - Torgeir