Package org.apache.sling.servlethelpers.internalrequests

# Class ServletInternalRequest

java.lang.Object
org.apache.sling.servlethelpers.internalrequests.BaseInternalRequest
org.apache.sling.servlethelpers.internalrequests.InternalRequest
org.apache.sling.servlethelpers.internalrequests.ServletInternalRequest

@Deprecated(since="2.0.0") public class ServletInternalRequest extends InternalRequest
Deprecated.
Use `JakartaServletInternalRequest` instead.
Internal request that a Servlet or Script directly, after resolving it using a ServletResolver. This bypasses the Servlet Filters used by the default Sling request processing pipeline, which are often not needed for internal requests. That's more efficient than the `SlingInternalRequest` variant, but less faithful to the way Sling processes HTTP requests.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final org.apache.sling.api.servlets.ServletResolver`
`servletResolver`
Deprecated.

### Fields inherited from class org.apache.sling.servlethelpers.internalrequests.BaseInternalRequest

`bodyReader, contentType, DEFAULT_METHOD, explicitStatusCheck, extension, log, MDC_KEY, parameters, path, requestMethod, resourceResolver, selectorString`

## Constructor Summary

Constructors
Constructor
Description
`ServletInternalRequest(@NotNull org.apache.sling.api.servlets.ServletResolver servletResolver, @NotNull org.apache.sling.api.resource.Resource resource)`
Deprecated.
Setup an internal request to the supplied Resource, using the supplied servlet/script resolver.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`delegateExecute(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, org.apache.sling.api.resource.ResourceResolver resourceResolver)`
Deprecated.
Execute the supplied Request
`protected org.apache.sling.api.resource.Resource`
`getExecutionResource()`
Deprecated.
Provide the Resource to use to execute the request
`String`
`toString()`
Deprecated.
Return essential request info, used to set the logging MDC

### Methods inherited from class org.apache.sling.servlethelpers.internalrequests.InternalRequest

`assertRequestExecuted, checkResponseContentType, checkStatus, execute, getResponse, getResponseAsString, getStatus, withBody, withContentType, withExtension, withParameter, withParameters, withRequestMethod, withSelectors`

### Methods inherited from class org.apache.sling.servlethelpers.internalrequests.BaseInternalRequest

`checkNotNull, checkNotNull`

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

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

## Field Details

### servletResolver

protected final org.apache.sling.api.servlets.ServletResolver servletResolver
Deprecated.

## Constructor Details

### ServletInternalRequest

public ServletInternalRequest(@NotNull @NotNull org.apache.sling.api.servlets.ServletResolver servletResolver, @NotNull @NotNull org.apache.sling.api.resource.Resource resource)
Deprecated.
Setup an internal request to the supplied Resource, using the supplied servlet/script resolver.

## Method Details

### toString

public String toString()
Deprecated.
Return essential request info, used to set the logging MDC

Overrides:
  `toString` in class `Object`

### getExecutionResource

protected org.apache.sling.api.resource.Resource getExecutionResource()
Deprecated.
Description copied from class: `BaseInternalRequest`
Provide the Resource to use to execute the request

Specified by:
  `getExecutionResource` in class `BaseInternalRequest`

### delegateExecute

protected void delegateExecute(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, org.apache.sling.api.resource.ResourceResolver resourceResolver) throws javax.servlet.ServletException, IOException
Deprecated.
Description copied from class: `InternalRequest`
Execute the supplied Request

Specified by:
  `delegateExecute` in class `InternalRequest`
Throws:
  `javax.servlet.ServletException`
  `IOException`