org.apache.sling.servlets.get.impl.helpers
Class JsonRendererServlet
java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class JsonRendererServlet
- extends SlingSafeMethodsServlet
The JsonRendererServlet
renders the current resource in JSON
on behalf of the DefaultGetServlet
.
- See Also:
- Serialized Form
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EXT_JSON
public static final String EXT_JSON
- See Also:
- Constant Field Values
INFINITY
public static final String INFINITY
- Recursion level selector that means "all levels"
- See Also:
- Constant Field Values
TIDY
public static final String TIDY
- See Also:
- Constant Field Values
JsonRendererServlet
public JsonRendererServlet(long maximumResults)
doGet
protected void doGet(SlingHttpServletRequest req,
SlingHttpServletResponse resp)
throws IOException
- Description copied from class:
SlingSafeMethodsServlet
- Called by the
SlingSafeMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse)
method to
handle an HTTP GET request.
This default implementation reports back to the client that the method is
not supported.
Implementations of this class should overwrite this method with their
implementation for the HTTP GET method support.
- Overrides:
doGet
in class SlingSafeMethodsServlet
- Parameters:
req
- The HTTP requestresp
- The HTTP response
- Throws:
IOException
- If the error status cannot be reported back to the
client.
isTidy
protected boolean isTidy(SlingHttpServletRequest req)
- True if our request wants the "tidy" pretty-printed format
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.