Package org.apache.sling.starter.testservices.servlets

# Class RequestUriOptingServlet

java.lang.Object
javax.servlet.GenericServlet
org.apache.sling.api.servlets.SlingSafeMethodsServlet
org.apache.sling.api.servlets.SlingAllMethodsServlet
org.apache.sling.starter.testservices.servlets.RequestUriOptingServlet

All Implemented Interfaces:
  `Serializable`, `javax.servlet.Servlet`, `javax.servlet.ServletConfig`, `org.apache.sling.api.servlets.OptingServlet`

public class RequestUriOptingServlet extends org.apache.sling.api.servlets.SlingAllMethodsServlet implements org.apache.sling.api.servlets.OptingServlet
OptingServlet that uses the RequestURI to opt in

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`RequestUriOptingServlet()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`accepts(org.apache.sling.api.SlingHttpServletRequest request)`
`protected void`
`doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)`
`protected void`
`doPost(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)`
`protected void`
`dumpRequestAsProperties(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)`

### Methods inherited from class org.apache.sling.api.servlets.SlingAllMethodsServlet

`doDelete, doPut, getAllowedRequestMethods, isMethodValid, mayService`

### Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet

`doGeneric, doHead, doOptions, doTrace, getServletInfo, handleMethodNotImplemented, service, service`

### Methods inherited from class javax.servlet.GenericServlet

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

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface javax.servlet.Servlet

`destroy, getServletConfig, getServletInfo, init, service`

## Constructor Details

### RequestUriOptingServlet

public RequestUriOptingServlet()

## Method Details

### accepts

public boolean accepts(org.apache.sling.api.SlingHttpServletRequest request)

Specified by:
  `accepts` in interface `org.apache.sling.api.servlets.OptingServlet`

### doGet

protected void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException

Overrides:
  `doGet` in class `org.apache.sling.api.servlets.SlingSafeMethodsServlet`
Throws:
  `javax.servlet.ServletException`
  `IOException`

### doPost

protected void doPost(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws javax.servlet.ServletException, IOException

Overrides:
  `doPost` in class `org.apache.sling.api.servlets.SlingAllMethodsServlet`
Throws:
  `javax.servlet.ServletException`
  `IOException`

### dumpRequestAsProperties

protected void dumpRequestAsProperties(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException

Throws:
  `IOException`