java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
i2p.susi.dns.TranslateSVGServlet
- All Implemented Interfaces:
Serializable, Servlet, ServletConfig
Translate a svg file on-the-fly. svg file must contain strings tagged with _("...") See TranslateReader for details. We don't bother parsing the XML and replacing entities, since we had TranslateReader already. If we want to use svg files unmodified, we'll have to parse the XML and replace the title and tspan elements. Servlet path contains .svg files in the /svg/ directory.
- See Also:
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final I2PAppContextApp context for naming and other services.private static final StringDirectory under the webapp holding the SVG files.private static final longPinned for serialized-form compatibility.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionprotected voiddoGet(HttpServletRequest req, HttpServletResponse resp) Handle GET requests for SVG translation.Methods inherited from class HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceMethods inherited from class GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
Field Details
serialVersionUID
private static final long serialVersionUIDPinned for serialized-form compatibility.- See Also:
_context
App context for naming and other services.DIR
Directory under the webapp holding the SVG files.- See Also:
Constructor Details
TranslateSVGServlet
public TranslateSVGServlet()Create a new TranslateSVGServlet.
Method Details
doGet
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException Handle GET requests for SVG translation.- Overrides:
doGetin classHttpServlet- Parameters:
req- the HTTP requestresp- the HTTP response- Throws:
ServletException- if a servlet error occursIOException- if an I/O error occurs