Class AsciiCoderServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
net.sourceforge.plantuml.servlet.AsciiCoderServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
Direct Known Subclasses:
PlantUmlServlet

public class AsciiCoderServlet extends jakarta.servlet.http.HttpServlet
ASCII encoder and decoder servlet for the webapp. This servlet encodes the diagram in text format or decodes the compressed diagram string.
See Also:
  • Field Summary

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
     
    protected void
    doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
     
    protected String
    getEncodedTextFromUrl(jakarta.servlet.http.HttpServletRequest request)
    Get encoded textual diagram source from URL.
    protected String
    Context path from the servlet mapping URL pattern.
    protected net.sourceforge.plantuml.code.Transcoder
    Get PlantUML transcoder.

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AsciiCoderServlet

      public AsciiCoderServlet()
  • Method Details

    • getServletContextPath

      protected String getServletContextPath()
      Context path from the servlet mapping URL pattern.
      Returns:
      servlet context path without leading or tailing slash
    • doGet

      public void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Throws:
      IOException
      jakarta.servlet.ServletException
    • doPost

      protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
      Overrides:
      doPost in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException
    • getTranscoder

      protected net.sourceforge.plantuml.code.Transcoder getTranscoder()
      Get PlantUML transcoder.
      Returns:
      transcoder instance
    • getEncodedTextFromUrl

      protected String getEncodedTextFromUrl(jakarta.servlet.http.HttpServletRequest request) throws IOException
      Get encoded textual diagram source from URL.
      Parameters:
      request - http request which contains the source URL
      Returns:
      if successful encoded textual diagram source from URL; otherwise empty string
      Throws:
      IOException - if an input or output exception occurred