public class IdenticonServlet extends HttpServlet
Currently only PNG is supported because javax.imageio package
does not come with built-in GIF encoder and PNG is the only remaining
reasonable format.
- inetSalt
- salt used to generate identicon code with. must be fairly long. (Required)
- cacheProvider
- full class path to
IdenticonCacheimplementation. (Optional)
- code
- identicon code to render. If missing, requester's IP addresses is used to generated one. (Optional)
- size
- identicon size in pixels. If missing, a 16x16 pixels identicon is returned. Minimum size is 16 and maximum is 64. (Optional)
| Constructor and Description |
|---|
IdenticonServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void | doGet(HttpServletRequest request,
HttpServletResponse response)Handle GET request: generate identicon image. |
void | init(ServletConfig cfg)Load configuration from servlet initialization parameters. |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, logprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet in class HttpServletServletExceptionIOExceptionpublic void init(ServletConfig cfg) throws ServletException
init in interface Servletinit in class GenericServletServletException