tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Lipofsky" <daniel.lipof...@bricsnet.com>
Subject RE: Tag to Unescape an HTML String?
Date Sat, 24 Jan 2004 00:45:12 GMT
java.net.URLDecoder.decode() will decode such a string.
You could create a simple tag that called the method
if you want.  Be aware that some servers are unhappy with
really big URLs.
- Dan

> -----Original Message-----
> From: James Watkin [mailto:james.watkin@anderson.ucla.edu]
> Sent: Friday, January 23, 2004 2:47 PM
> To: taglibs-user@jakarta.apache.org
> Subject: Tag to Unescape an HTML String?
> 
> 
> I have a question regarding the following problem and 
> proposed solution: 
> Within a JSP, what would be the most efficient way to 
> unescape an HTML 
> string? The Regexp tag library? I've managed to avoid writing regular 
> expressions for a long time.
> 
> Problem:
> I'm creating some reusable JSP templates that are chained 
> together with 
> <c:import>. I'm trying to solve the well known problem of 
> having to create 
> two new JSPs for every new page -- one for the new page body, 
> the other to 
> import the master page layout and pass the URL of the new 
> page body JSP.
> 
> Proposed Solution:
> Rather than pass the master page layout a URL for the body JSP, I can 
> eliminate the body JSP by passing in the body as a String. If 
> my master 
> page layout is within the same container, then I can use 
> <c:set> and not 
> have to worry about unescaping the body String. However, I'd 
> prefer (I 
> think) to have the master page layout live outside the container, 
> especially since the JSTL spec notes that foreign context 
> access within the 
> same container might not be supported by all containers. If 
> the master page 
> layout JSP is outside the container of the importing JSP, 
> then the body 
> HTML String has to be passed with <c:param>, which escapes 
> the string. So 
> I'll need to unescape it be I can use it.
> 
> - Jim
> 
> ______________________________
> James Watkin
> ACIS Software Development
> The Anderson School at UCLA
> james.watkin@anderson.ucla.edu
> Voice: 1-310-825-5030
>    Fax: 1-310-825-4835
> ______________________________ 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message