Wiki
Clone wikigravatar-taglib / Home
Welcome
MEHD amirirad This library generates a link for gravatar images in JSP files
The project is on the maven central repository, so you can easy implement by add the dependency
In your pom:
<dependencies>
...
<dependency>
<groupId>hu.paalgyula</groupId>
<artifactId>gravatar-taglib</artifactId>
<version>0.1.4</version>
<type>jar</type>
</dependency>
...
</dependencies>
Example usage
Taglib:
<%@ taglib prefix="gravatar" uri="http://www.paalgyula.hu/schemas/tld/gravatar" %>
<gravatar:image email="paalgyula@paalgyula.hu" size="64"/>
this taglib has 3 attributes:
- email - String (required)
- size - int (optional, default 32)
- forceHttps - boolean (optional, default the servlet contexts protocol)
Function:
<%@ taglib prefix="gravatar" uri="http://www.paalgyula.hu/schemas/tld/gravatar" %>
<img src="${gravatar:image(pEmail, 32, false)}" alt="Gravatar" title="Gravatar"/>
gravatar:image function takes 3 argument
- email address
- picture size in pixels
- HTTP/HTTPS boolean
Updated