Escape taglib ver. 2.0


    JSP custom tags library. Lets you escape/unescape HTML tags. Also could be useful for WAP/WML developers - converts on the fly HTML to WML.

Escape tag converts enclosing HTML tags to the appropriate codes (< > etc.). E.g.:
 


<%@ taglib uri="taglib1.tld" prefix="esc" %>
<esc:Escape>
  <html>

  your HTML code is here ...

  </html>
</esc:Escape>

Body tag UnEscape tag converts codes back (&lt; to < &gt; to > etc.). Could be useful for example when you need to display some data (e.g. extracted from some XML file) on your page:
 


<%@ taglib uri="taglib1.tld" prefix="esc" %>
<esc:UnEscape>
  <html>

  your escaped HTML code is here ...

  </html>
</esc:UnEscape>

WmlEscape keeps any HTML code as it is for non-WAP browser and converts it on the fly to the appropriate WML code otherwise. So it is a quick way to WML-ize your content. Just put this tag at the beginning of the each your page and all pages will be readable from the mobile phones! E.g.:
 


<%@ taglib uri="taglib1.tld" prefix="phone" %>
<phone:WmlEscape>
  <html>

  Your HTML code is here ...

  </html>
</phone:WmlEscape>

WML file has got a restricted size. This tag can split your content and generate on the fly appropriate JSP files (and link them together in WML cards). You need just set two parameters for this tag: directory on your server for generated files (parameter name is dir) and an appropriate URL for access to this directory (parameter name is url).
For example: suppose the root directory of your web server is c:\inetpub. You can create subdirectory wmlpages and use WmlEscape tag with parameters:
 


<%@ taglib uri="taglib1.tld" prefix="phone" %>
<phone:WmlEscape dir="c:\\inetpub\\wmlpages" url="http://your_host/wmlpages">
  <html>

  Your HTML code is here ...

  </html>
</phone:WmlEscape>

Note: evaluation version outputs the first three WML pages only

for downloading:

Library: escape.jar    Description: taglib1.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Also in Coldtags: