Skip to content

A struts2 tag to display email addresses. Created for a client who couldn't bear to have email addresses in the clear...

Notifications You must be signed in to change notification settings

VeRSI-Australia/LaTrobe-Archaeology-JavaStrutsEmailTag

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

At the moment a simple struts2 tag to render emailto anchors in some sort of of obfuscated format.

Be warned: It is more a proof of concept and thus has no real obfuscation, html escaping, or tests. Yet. If it works out I plan to add the option to obfuscate all addresses rendered to non logged on users.

Usage

The attributes currently supported are:

  • value: The OGNL expression to locate the email address to use. Will default to "top" if not used.
  • writeWithJavaScript: either true or false. If true uses JavaScript to render element. Default is false.
  • default: The email address to use if nothing is found by the OGNL expression.
  • id: The html element id. Will not be output if not present.
  • clazz: The html class. Will not be output if not present.
  • title: The html title. Will not be output if not present.
  • style: The style to use on the tag. If you must.

JSP:

<%@ taglib prefix="versi" uri="WEB-INF/versi.tld"%>

<p>You can be reached at: <versi:emailAnchor id="2" clazz="test" title="A jolly person" style="background-color:yellow;" value="email" default="[email protected]" writeWithJavaScript="true" /></p>

Velocity:

<p>You can be reached at: #semailAnchor("value=email" "title='Contact us email address'" "[email protected]")</p>

FreeMarker

<p>You can be reached at: <@versi.emailAnchor value="email" title="Help email address" default="[email protected]" /></p>

Licence

GPL: See doc/LICENCE

About

A struts2 tag to display email addresses. Created for a client who couldn't bear to have email addresses in the clear...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published