org.apache.sling.launchpad.testservices.servlets
Class HtmlDefaultServlet
java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
org.apache.sling.api.servlets.SlingAllMethodsServlet
org.apache.sling.launchpad.testservices.servlets.HtmlDefaultServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
@Service(value=javax.servlet.Servlet.class)
@Properties(value={@Property(name="service.description",value="HTML Default Test Servlet"),@Property(name="service.vendor",value="The Apache Software Foundation"),@Property(name="sling.servlet.resourceTypes",value="sling/servlet/default"),@Property(name="sling.servlet.extensions",value="html"),@Property(name="sling.servlet.methods",value="GET")})
public class HtmlDefaultServlet
- extends SlingAllMethodsServlet
Default servlet for the html extension, see SLING-1069.
This servlet collides with the Default GET Servlet generating proper HTML not
expected by HtmlDefaultServletTest. For this reason this component is
disabled by default and must be enabled for testing in the
HtmlDefaultServletTest class.
- 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 |
HtmlDefaultServlet
public HtmlDefaultServlet()
doGet
protected void doGet(SlingHttpServletRequest request,
SlingHttpServletResponse response)
throws javax.servlet.ServletException,
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:
request
- The HTTP requestresponse
- The HTTP response
- Throws:
javax.servlet.ServletException
- Not thrown by this implementation.
IOException
- If the error status cannot be reported back to the
client.
doPost
protected void doPost(SlingHttpServletRequest request,
SlingHttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Description copied from class:
SlingAllMethodsServlet
- Called by the
SlingAllMethodsServlet.mayService(SlingHttpServletRequest, SlingHttpServletResponse)
method to
handle an HTTP POST 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 POST method support.
- Overrides:
doPost
in class SlingAllMethodsServlet
- Parameters:
request
- The HTTP requestresponse
- The HTTP response
- Throws:
javax.servlet.ServletException
- Not thrown by this implementation.
IOException
- If the error status cannot be reported back to the
client.
dumpRequestAsProperties
protected void dumpRequestAsProperties(SlingHttpServletRequest request,
SlingHttpServletResponse response)
throws IOException
- Throws:
IOException
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.