BrightSide Workbench Full Report + Source Code
org.turro.elephant.snippet.SnippetServlet Class Reference
Inheritance diagram for org.turro.elephant.snippet.SnippetServlet:
Collaboration diagram for org.turro.elephant.snippet.SnippetServlet:

Public Member Functions

String getServletInfo ()
 

Protected Member Functions

void processRequest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 
void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 
void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 40 of file SnippetServlet.java.

Member Function Documentation

◆ doGet()

void org.turro.elephant.snippet.SnippetServlet.doGet ( HttpServletRequest  request,
HttpServletResponse  response 
) throws ServletException, IOException
protected

Definition at line 58 of file SnippetServlet.java.

58  {
59  processRequest(request, response);
60  }
void processRequest(HttpServletRequest request, HttpServletResponse response)

◆ doPost()

void org.turro.elephant.snippet.SnippetServlet.doPost ( HttpServletRequest  request,
HttpServletResponse  response 
) throws ServletException, IOException
protected

Definition at line 63 of file SnippetServlet.java.

63  {
64  processRequest(request, response);
65  }

◆ getServletInfo()

String org.turro.elephant.snippet.SnippetServlet.getServletInfo ( )

Definition at line 68 of file SnippetServlet.java.

68  {
69  return "Elephant Snippets";
70  }

◆ processRequest()

void org.turro.elephant.snippet.SnippetServlet.processRequest ( HttpServletRequest  request,
HttpServletResponse  response 
) throws ServletException, IOException
protected

Definition at line 46 of file SnippetServlet.java.

46  {
47  KeyValueMap map = new KeyValueMap();
48  if(hasJsonBody(request)) {
49  map.put(Snippets.JSONPAR, readBody(request));
50  }
51  for(String key : request.getParameterMap().keySet()) {
52  map.put(key, URLDecoder.decode(request.getParameter(key), StandardCharsets.UTF_8));
53  }
54  processJson(new ElephantApplication(request, response), request.getPathInfo(), map);
55  }

The documentation for this class was generated from the following file: