Package org.apache.sling.servlets.resolver.internal.resource

# Class ServletResourceProviderFactory

java.lang.Object
org.apache.sling.servlets.resolver.internal.resource.ServletResourceProviderFactory

public class ServletResourceProviderFactory extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`SERVLET_PATH_EXTENSION`
The extension appended to servlets to register into the resource tree to simplify handling in the resolution process (value is ".servlet").

## Constructor Summary

Constructors
Constructor
Description
`ServletResourceProviderFactory(String servletRoot, List<String> searchPath)`
Constructor

## Method Summary

Modifier and Type
Method
Description
`ServletResourceProvider`
`create(org.osgi.framework.ServiceReference<javax.servlet.Servlet> ref, javax.servlet.Servlet servlet)`
Create a servlet resource provider for the servlet
`static String`
`getServiceReferenceInfo(org.osgi.framework.ServiceReference<javax.servlet.Servlet> reference)`

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

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

## Field Details

### SERVLET_PATH_EXTENSION

public static final String SERVLET_PATH_EXTENSION
The extension appended to servlets to register into the resource tree to simplify handling in the resolution process (value is ".servlet").

See Also:
  - Constant Field Values

## Constructor Details

### ServletResourceProviderFactory

public ServletResourceProviderFactory(String servletRoot, List<String> searchPath)
Constructor

Parameters:
  `servletRoot` - The default value for the servlet root

## Method Details

### create

public ServletResourceProvider create(org.osgi.framework.ServiceReference<javax.servlet.Servlet> ref, javax.servlet.Servlet servlet)
Create a servlet resource provider for the servlet

Parameters:
  `ref` - The service reference for the servlet
  `servlet` - The servlet object itself
Returns:
  A servlet resource provider

### getServiceReferenceInfo

public static String getServiceReferenceInfo(org.osgi.framework.ServiceReference<javax.servlet.Servlet> reference)