Escape taglib ver. 1.9

    JSP custom tags library. Also useful for WAP/WML developers - converts on the fly HTML to WML. Library has got two body tags Escape and WmlEscape.

Escape tag converts enclosing HTML tags to the appropriate codes (< > etc.) so you can view them on WAP browsers. E.g.:
 


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

  your HTML code is here ...

  </html>
</esc:Escape>

WmlEscape keeps 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.