Top Description Fields Constructors Methods
org.apache.catalina.connector

public Class Connector

extends LifecycleMBeanBase
Class Inheritance
Imports
java.io.UnsupportedEncodingException, java.net.InetAddress, java.nio.charset.Charset, .StandardCharsets, java.util.Arrays, .HashSet, javax.management.ObjectName, org.apache.catalina.Globals, .LifecycleException, .LifecycleState, .Service, org.apache.catalina.core.AprStatus, org.apache.catalina.util.LifecycleMBeanBase, org.apache.coyote.AbstractProtocol, .Adapter, .ProtocolHandler, .UpgradeProtocol, org.apache.coyote.http11.AbstractHttp11JsseProtocol, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.util.IntrospectionUtils, org.apache.tomcat.util.buf.B2CConverter, .CharsetUtil, .EncodedSolidusHandling, org.apache.tomcat.util.net.SSLHostConfig, org.apache.tomcat.util.net.openssl.OpenSSLImplementation, org.apache.tomcat.util.res.StringManager

Implementation of a Coyote connector.
Authors
Craig R. McClanahan, Remy Maucherat

Field Summary

Modifier and TypeField and Description
protected Adapter
adapter

Coyote adapter.

protected boolean
allowBackslash

If this is true the '\' character will be permitted as a path delimiter.

protected boolean
allowTrace

Do we allow TRACE ?

protected long
asyncTimeout

Default timeout for asynchronous requests (ms).

protected final String
configuredProtocol

Name of the protocol that was configured.

protected boolean
discardFacades

The flag that controls recycling of the facades of the request processing objects.

protected boolean
enableLookups

The "enable DNS lookups" flag for this Connector.

private EncodedSolidusHandling
encodedSolidusHandling

The behavior when an encoded solidus (slash) is submitted.

protected boolean
enforceEncodingInGetWriter

If this is true then a call to Response.getWriter() if no character encoding has been specified will result in subsequent calls to Response.getCharacterEncoding() returning ISO-8859-1 and the Content-Type response header will include a charset=ISO-8859-1 component.

public static final String
private static final Log
private int
maxCookieCount

The maximum number of cookies permitted for a request.

protected int
maxParameterCount

The maximum number of parameters (GET plus POST) which will be automatically parsed by the container.

protected int
maxPostSize

Maximum size of a POST which will be automatically parsed by the container.

protected int
maxSavePostSize

Maximum size of a POST which will be saved by the container during authentication.

protected String
parseBodyMethods

Comma-separated list of HTTP methods that will be parsed according to POST-style rules for application/x-www-form-urlencoded request bodies.

protected HashSet<String>
parseBodyMethodsSet

A Set of methods determined by parseBodyMethods.

protected final ProtocolHandler
protocolHandler

Coyote protocol handler.

protected final String
protocolHandlerClassName

Coyote Protocol handler class name.

protected String
proxyName

The server name to which we should pretend requests to this Connector were directed.

protected int
proxyPort

The server port to which we should pretend requests to this Connector were directed.

protected int
redirectPort

The redirect port for non-SSL to SSL redirects.

private boolean
protected String
scheme

The request scheme that will be set on all requests received through this connector.

protected boolean
secure

The secure connection flag that will be set on all requests received through this connector.

protected Service
service

The Service we are associated with (if any).

protected static final StringManager
sm

Hides org.apache.catalina.util.LifecycleMBeanBase.sm.

The string manager for this package.
private Charset
uriCharset

The URI encoding in use.

protected boolean
useBodyEncodingForURI

URI encoding as body.

protected boolean
useIPVHosts

Flag to use IP-based virtual hosting.

protected boolean
xpoweredBy

Is generation of X-Powered-By response header enabled/disabled?

Constructor Summary

AccessConstructor and Description
public
Connector()

Defaults to using HTTP/1.1 NIO implementation.

public
Connector(String protocol)

public
Connector(ProtocolHandler protocolHandler)

Method Summary

Modifier and TypeMethod and Description
public void
public void
protected String
public Request

Returns:

a new Servlet request object
createRequest
()

Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.

public Response

Returns:

a new Servlet response object
createResponse
()

Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.

protected void
destroyInternal()

Overrides org.apache.catalina.util.LifecycleMBeanBase.destroyInternal.

Sub-classes wishing to perform additional clean-up should override this method, ensuring that super.destroyInternal() is the last call in the overriding method.

public SSLHostConfig[]
public UpgradeProtocol[]
public boolean

Returns:

true if backslash characters are allowed in URLs. Default value is false.
getAllowBackslash
()

public boolean

Returns:

true if the TRACE method is allowed. Default value is false.
getAllowTrace
()

public long

Returns:

the default timeout for async requests in ms.
getAsyncTimeout
()

public boolean

Returns:

true if the object facades are discarded, either when the discardFacades value is true or when the security manager is enabled.
getDiscardFacades
()

protected String
getDomainInternal()

Implements abstract org.apache.catalina.util.LifecycleMBeanBase.getDomainInternal.

Method implemented by sub-classes to identify the domain in which MBeans should be registered.

public boolean

Returns:

the "enable DNS lookups" flag.
getEnableLookups
()

public String
public EncodedSolidusHandling
public boolean

Returns:

true if a default character encoding will be set when calling Response.getWriter()
getEnforceEncodingInGetWriter
()

public String
public int

Returns:

the port number on which this connector is listening to requests. If the special value for getPort of zero is used then this method will report the actual port bound.
getLocalPort
()

public int
public int

Returns:

the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. A value of less than 0 means no limit.
getMaxParameterCount
()

public int

Returns:

the maximum size of a POST which will be automatically parsed by the container.
getMaxPostSize
()

public int

Returns:

the maximum size of a POST which will be saved by the container during authentication.
getMaxSavePostSize
()

protected String
getObjectNameKeyProperties()

Implements abstract org.apache.catalina.util.LifecycleMBeanBase.getObjectNameKeyProperties.

Allow sub-classes to specify the key properties component of the ObjectName that will be used to register this component.

public String

Returns:

the HTTP methods which will support body parameters parsing
getParseBodyMethods
()

public int

Returns:

the port number on which this connector is configured to listen for requests. The special value of 0 means select a random free port when the socket is bound.
getPort
()

public int
public int
public Object

Returns:

the property value
getProperty
(String
the property name
name
)

Return a property from the protocol handler.

public String

Returns:

the Coyote protocol handler in use.
getProtocol
()

public ProtocolHandler

Returns:

the protocol handler associated with the connector.
getProtocolHandler
()

public String

Returns:

the class name of the Coyote protocol handler in use.
getProtocolHandlerClassName
()

public String

Returns:

the proxy server name for this Connector.
getProxyName
()

public int

Returns:

the proxy server port for this Connector.
getProxyPort
()

public int

Returns:

the port number to which a request should be redirected if it comes in on a non-SSL port and is subject to a security constraint with a transport guarantee that requires SSL.
getRedirectPort
()

public int
public boolean
public String

Returns:

the scheme that will be assigned to requests received through this connector. Default value is "http".
getScheme
()

public boolean

Returns:

the secure connection flag that will be assigned to requests received through this connector. Default value is "false".
getSecure
()

public Service

Returns:

the Service with which we are associated (if any).
getService
()

public Charset

Returns:

The Charset to use to convert raw URI bytes (after %nn decoding) to characters. This will never be null
getURICharset
()

public String

Returns:

the name of character encoding to be used for the URI using the original case.
getURIEncoding
()

public boolean

Returns:

the true if the entity body encoding should be used for the URI.
getUseBodyEncodingForURI
()

public boolean

Returns:

true if IP vhosts are enabled
getUseIPVHosts
()

Test if IP-based virtual hosting is enabled.

public boolean

Returns:

true if generation of X-Powered-By response header is enabled, false otherwise
getXpoweredBy
()

Indicates whether the generation of an X-Powered-By response header for Servlet-generated responses is enabled or disabled for this Connector.

protected void
initInternal()

Overrides org.apache.catalina.util.LifecycleMBeanBase.initInternal.

Sub-classes wishing to perform additional initialization should override this method, ensuring that super.initInternal() is the first call in the overriding method.

protected boolean
public void
pause()

Pause the connector.

public void
resume()

Resume the connector.

public void
setAllowBackslash(boolean
the new flag value
allowBackslash
)

Set the allowBackslash flag.

public void
setAllowTrace(boolean
The new allowTrace flag
allowTrace
)

Set the allowTrace flag, to disable or enable the TRACE HTTP method.

public void
setAsyncTimeout(long
The new timeout in ms.
asyncTimeout
)

Set the default timeout for async requests.

public void
setDiscardFacades(boolean
the new value of the flag
discardFacades
)

Set the recycling strategy for the object facades.

public void
setEnableLookups(boolean
The new "enable DNS lookups" flag value
enableLookups
)

Set the "enable DNS lookups" flag.

public void
setEncodedSolidusHandling(String encodedSolidusHandling)

public void
setEnforceEncodingInGetWriter(boolean
the new flag value
enforceEncodingInGetWriter
)

Set the enforceEncodingInGetWriter flag.

public void
setMaxCookieCount(int maxCookieCount)

public void
setMaxParameterCount(int
The new setting
maxParameterCount
)

Set the maximum number of parameters (GET plus POST) that will be automatically parsed by the container.

public void
setMaxPostSize(int
The new maximum size in bytes of a POST which will be automatically parsed by the container
maxPostSize
)

Set the maximum size of a POST which will be automatically parsed by the container.

public void
setMaxSavePostSize(int
The new maximum size in bytes of a POST which will be saved by the container during authentication.
maxSavePostSize
)

Set the maximum size of a POST which will be saved by the container during authentication.

public void
setParseBodyMethods(String
Comma separated list of HTTP method names
methods
)

Set list of HTTP methods which should allow body parameter parsing.

public void
setPort(int
The new port number
port
)

Set the port number on which we listen for requests.

public void
setPortOffset(int portOffset)

public boolean

Returns:

true if the property was successfully set
setProperty
(String
the property name
name
,
String
the property value
value
)

Set a property on the protocol handler.

public void
setProxyName(String
The new proxy server name
proxyName
)

Set the proxy server name for this Connector.

public void
setProxyPort(int
The new proxy server port
proxyPort
)

Set the proxy server port for this Connector.

public void
setRedirectPort(int
The redirect port number (non-SSL to SSL)
redirectPort
)

Set the redirect port number.

public void
setRejectSuspiciousURIs(boolean rejectSuspiciousURIs)

public void
setScheme(String
The new scheme
scheme
)

Set the scheme that will be assigned to requests received through this connector.

public void
setSecure(boolean
The new secure connection flag
secure
)

Set the secure connection flag that will be assigned to requests received through this connector.

public void
setService(Service
The service that owns this Engine
service
)

Set the Service with which we are associated (if any).

public void
setURIEncoding(String
The new URI character encoding.
URIEncoding
)

Set the URI encoding to be used for the URI.

public void
setUseBodyEncodingForURI(boolean
The new value for the flag.
useBodyEncodingForURI
)

Set if the entity body encoding should be used for the URI.

public void
setUseIPVHosts(boolean
true if Hosts are identified by IP, false if Hosts are identified by name.
useIPVHosts
)

Enable the use of IP-based virtual hosting.

public void
setXpoweredBy(boolean
true if generation of X-Powered-By response header is to be enabled, false otherwise
xpoweredBy
)

Enables or disables the generation of an X-Powered-By header (with value Servlet/2.5) for all servlet-generated responses returned by this Connector.

protected void
startInternal()

Implements abstract org.apache.catalina.util.LifecycleBase.startInternal.

Begin processing requests via this Connector.

protected void
stopInternal()

Implements abstract org.apache.catalina.util.LifecycleBase.stopInternal.

Terminate processing requests via this Connector.

public String
toString()

Overrides java.lang.Object.toString.

Provide a useful toString() implementation as it may be used when logging Lifecycle errors to identify the component.

Inherited from org.apache.catalina.util.LifecycleMBeanBase:
getDomaingetObjectNamepostDeregisterpostRegisterpreDeregisterpreRegisterregistersetDomainunregisterunregister

Field Detail

adapterback to summary
protected Adapter adapter

Coyote adapter.

allowBackslashback to summary
protected boolean allowBackslash

If this is true the '\' character will be permitted as a path delimiter. If not specified, the default value of false will be used.

allowTraceback to summary
protected boolean allowTrace

Do we allow TRACE ?

asyncTimeoutback to summary
protected long asyncTimeout

Default timeout for asynchronous requests (ms).

configuredProtocolback to summary
protected final String configuredProtocol

Name of the protocol that was configured.

discardFacadesback to summary
protected boolean discardFacades

The flag that controls recycling of the facades of the request processing objects. If set to true the object facades will be discarded when the request is recycled. If the security manager is enabled, this setting is ignored and object facades are always discarded.

enableLookupsback to summary
protected boolean enableLookups

The "enable DNS lookups" flag for this Connector.

encodedSolidusHandlingback to summary
private EncodedSolidusHandling encodedSolidusHandling

The behavior when an encoded solidus (slash) is submitted.

enforceEncodingInGetWriterback to summary
protected boolean enforceEncodingInGetWriter

If this is true then a call to Response.getWriter() if no character encoding has been specified will result in subsequent calls to Response.getCharacterEncoding() returning ISO-8859-1 and the Content-Type response header will include a charset=ISO-8859-1 component. (SRV.15.2.22.1) If not specified, the default specification compliant value of true will be used.

INTERNAL_EXECUTOR_NAMEback to summary
public static final String INTERNAL_EXECUTOR_NAME
logback to summary
private static final Log log

Hides org.apache.catalina.util.LifecycleMBeanBase.log.

maxCookieCountback to summary
private int maxCookieCount

The maximum number of cookies permitted for a request. Use a value less than zero for no limit. Defaults to 200.

maxParameterCountback to summary
protected int maxParameterCount

The maximum number of parameters (GET plus POST) which will be automatically parsed by the container. 10000 by default. The default Tomcat server.xml configures a lower default of 1000. A value of less than 0 means no limit.

maxPostSizeback to summary
protected int maxPostSize

Maximum size of a POST which will be automatically parsed by the container. 2 MiB by default.

maxSavePostSizeback to summary
protected int maxSavePostSize

Maximum size of a POST which will be saved by the container during authentication. 4 KiB by default

parseBodyMethodsback to summary
protected String parseBodyMethods

Comma-separated list of HTTP methods that will be parsed according to POST-style rules for application/x-www-form-urlencoded request bodies.

parseBodyMethodsSetback to summary
protected HashSet<String> parseBodyMethodsSet

A Set of methods determined by parseBodyMethods.

protocolHandlerback to summary
protected final ProtocolHandler protocolHandler

Coyote protocol handler.

protocolHandlerClassNameback to summary
protected final String protocolHandlerClassName

Coyote Protocol handler class name. See Connector() for current default.

proxyNameback to summary
protected String proxyName

The server name to which we should pretend requests to this Connector were directed. This is useful when operating Tomcat behind a proxy server, so that redirects get constructed accurately. If not specified, the server name included in the Host header is used.

proxyPortback to summary
protected int proxyPort

The server port to which we should pretend requests to this Connector were directed. This is useful when operating Tomcat behind a proxy server, so that redirects get constructed accurately. If not specified, the port number specified by the port property is used.

redirectPortback to summary
protected int redirectPort

The redirect port for non-SSL to SSL redirects.

rejectSuspiciousURIsback to summary
private boolean rejectSuspiciousURIs
schemeback to summary
protected String scheme

The request scheme that will be set on all requests received through this connector.

secureback to summary
protected boolean secure

The secure connection flag that will be set on all requests received through this connector.

serviceback to summary
protected Service service

The Service we are associated with (if any).

smback to summary
protected static final StringManager sm

Hides org.apache.catalina.util.LifecycleMBeanBase.sm.

The string manager for this package.

uriCharsetback to summary
private Charset uriCharset

The URI encoding in use.

useBodyEncodingForURIback to summary
protected boolean useBodyEncodingForURI

URI encoding as body.

useIPVHostsback to summary
protected boolean useIPVHosts

Flag to use IP-based virtual hosting.

xpoweredByback to summary
protected boolean xpoweredBy

Is generation of X-Powered-By response header enabled/disabled?

Constructor Detail

Connectorback to summary
public Connector()

Defaults to using HTTP/1.1 NIO implementation.

Connectorback to summary
public Connector(String protocol)
Connectorback to summary
public Connector(ProtocolHandler protocolHandler)

Method Detail

addSslHostConfigback to summary
public void addSslHostConfig(SSLHostConfig sslHostConfig)
addUpgradeProtocolback to summary
public void addUpgradeProtocol(UpgradeProtocol upgradeProtocol)
createObjectNameKeyPropertiesback to summary
protected String createObjectNameKeyProperties(String type)
createRequestback to summary
public Request createRequest()

Create (or allocate) and return a Request object suitable for specifying the contents of a Request to the responsible Container.

Returns:Request

a new Servlet request object

createResponseback to summary
public Response createResponse()

Create (or allocate) and return a Response object suitable for receiving the contents of a Response from the responsible Container.

Returns:Response

a new Servlet response object

destroyInternalback to summary
protected void destroyInternal() throws LifecycleException

Overrides org.apache.catalina.util.LifecycleMBeanBase.destroyInternal.

Doc from org.apache.catalina.util.LifecycleMBeanBase.destroyInternal.

Sub-classes wishing to perform additional clean-up should override this method, ensuring that super.destroyInternal() is the last call in the overriding method.

Annotations
@Override
Exceptions
LifecycleException:

Doc from org.apache.catalina.util.LifecycleBase.destroyInternal.

If the destruction fails

findSslHostConfigsback to summary
public SSLHostConfig[] findSslHostConfigs()
findUpgradeProtocolsback to summary
public UpgradeProtocol[] findUpgradeProtocols()
getAllowBackslashback to summary
public boolean getAllowBackslash()
Returns:boolean

true if backslash characters are allowed in URLs. Default value is false.

getAllowTraceback to summary
public boolean getAllowTrace()
Returns:boolean

true if the TRACE method is allowed. Default value is false.

getAsyncTimeoutback to summary
public long getAsyncTimeout()
Returns:long

the default timeout for async requests in ms.

getDiscardFacadesback to summary
public boolean getDiscardFacades()
Returns:boolean

true if the object facades are discarded, either when the discardFacades value is true or when the security manager is enabled.

getDomainInternalback to summary
protected String getDomainInternal()

Implements abstract org.apache.catalina.util.LifecycleMBeanBase.getDomainInternal.

Doc from org.apache.catalina.util.LifecycleMBeanBase.getDomainInternal.

Method implemented by sub-classes to identify the domain in which MBeans should be registered.

Returns:String

The name of the domain to use to register MBeans.

Annotations
@Override
getEnableLookupsback to summary
public boolean getEnableLookups()
Returns:boolean

the "enable DNS lookups" flag.

getEncodedSolidusHandlingback to summary
public String getEncodedSolidusHandling()
getEncodedSolidusHandlingInternalback to summary
public EncodedSolidusHandling getEncodedSolidusHandlingInternal()
getEnforceEncodingInGetWriterback to summary
public boolean getEnforceEncodingInGetWriter()
Returns:boolean

true if a default character encoding will be set when calling Response.getWriter()

getExecutorNameback to summary
public String getExecutorName()
getLocalPortback to summary
public int getLocalPort()
Returns:int

the port number on which this connector is listening to requests. If the special value for getPort of zero is used then this method will report the actual port bound.

getMaxCookieCountback to summary
public int getMaxCookieCount()
getMaxParameterCountback to summary
public int getMaxParameterCount()
Returns:int

the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. A value of less than 0 means no limit.

getMaxPostSizeback to summary
public int getMaxPostSize()
Returns:int

the maximum size of a POST which will be automatically parsed by the container.

getMaxSavePostSizeback to summary
public int getMaxSavePostSize()
Returns:int

the maximum size of a POST which will be saved by the container during authentication.

getObjectNameKeyPropertiesback to summary
protected String getObjectNameKeyProperties()

Implements abstract org.apache.catalina.util.LifecycleMBeanBase.getObjectNameKeyProperties.

Doc from org.apache.catalina.util.LifecycleMBeanBase.getObjectNameKeyProperties.

Allow sub-classes to specify the key properties component of the ObjectName that will be used to register this component.

Returns:String

The string representation of the key properties component of the desired ObjectName

Annotations
@Override
getParseBodyMethodsback to summary
public String getParseBodyMethods()
Returns:String

the HTTP methods which will support body parameters parsing

getPortback to summary
public int getPort()
Returns:int

the port number on which this connector is configured to listen for requests. The special value of 0 means select a random free port when the socket is bound.

getPortOffsetback to summary
public int getPortOffset()
getPortWithOffsetback to summary
public int getPortWithOffset()
getPropertyback to summary
public Object getProperty(String name)

Return a property from the protocol handler.

Parameters
name:String

the property name

Returns:Object

the property value

getProtocolback to summary
public String getProtocol()
Returns:String

the Coyote protocol handler in use.

getProtocolHandlerback to summary
public ProtocolHandler getProtocolHandler()
Returns:ProtocolHandler

the protocol handler associated with the connector.

getProtocolHandlerClassNameback to summary
public String getProtocolHandlerClassName()
Returns:String

the class name of the Coyote protocol handler in use.

getProxyNameback to summary
public String getProxyName()
Returns:String

the proxy server name for this Connector.

getProxyPortback to summary
public int getProxyPort()
Returns:int

the proxy server port for this Connector.

getRedirectPortback to summary
public int getRedirectPort()
Returns:int

the port number to which a request should be redirected if it comes in on a non-SSL port and is subject to a security constraint with a transport guarantee that requires SSL.

getRedirectPortWithOffsetback to summary
public int getRedirectPortWithOffset()
getRejectSuspiciousURIsback to summary
public boolean getRejectSuspiciousURIs()
getSchemeback to summary
public String getScheme()
Returns:String

the scheme that will be assigned to requests received through this connector. Default value is "http".

getSecureback to summary
public boolean getSecure()
Returns:boolean

the secure connection flag that will be assigned to requests received through this connector. Default value is "false".

getServiceback to summary
public Service getService()
Returns:Service

the Service with which we are associated (if any).

getURICharsetback to summary
public Charset getURICharset()
Returns:Charset

The Charset to use to convert raw URI bytes (after %nn decoding) to characters. This will never be null

getURIEncodingback to summary
public String getURIEncoding()
Returns:String

the name of character encoding to be used for the URI using the original case.

getUseBodyEncodingForURIback to summary
public boolean getUseBodyEncodingForURI()
Returns:boolean

the true if the entity body encoding should be used for the URI.

getUseIPVHostsback to summary
public boolean getUseIPVHosts()

Test if IP-based virtual hosting is enabled.

Returns:boolean

true if IP vhosts are enabled

getXpoweredByback to summary
public boolean getXpoweredBy()

Indicates whether the generation of an X-Powered-By response header for Servlet-generated responses is enabled or disabled for this Connector.

Returns:boolean

true if generation of X-Powered-By response header is enabled, false otherwise

initInternalback to summary
protected void initInternal() throws LifecycleException

Overrides org.apache.catalina.util.LifecycleMBeanBase.initInternal.

Doc from org.apache.catalina.util.LifecycleMBeanBase.initInternal.

Sub-classes wishing to perform additional initialization should override this method, ensuring that super.initInternal() is the first call in the overriding method.

Annotations
@Override
Exceptions
LifecycleException:

Doc from org.apache.catalina.util.LifecycleBase.initInternal.

If the initialisation fails

isParseBodyMethodback to summary
protected boolean isParseBodyMethod(String method)
pauseback to summary
public void pause()

Pause the connector.

resumeback to summary
public void resume()

Resume the connector.

setAllowBackslashback to summary
public void setAllowBackslash(boolean allowBackslash)

Set the allowBackslash flag.

Parameters
allowBackslash:boolean

the new flag value

setAllowTraceback to summary
public void setAllowTrace(boolean allowTrace)

Set the allowTrace flag, to disable or enable the TRACE HTTP method.

Parameters
allowTrace:boolean

The new allowTrace flag

setAsyncTimeoutback to summary
public void setAsyncTimeout(long asyncTimeout)

Set the default timeout for async requests.

Parameters
asyncTimeout:long

The new timeout in ms.

setDiscardFacadesback to summary
public void setDiscardFacades(boolean discardFacades)

Set the recycling strategy for the object facades.

Parameters
discardFacades:boolean

the new value of the flag

setEnableLookupsback to summary
public void setEnableLookups(boolean enableLookups)

Set the "enable DNS lookups" flag.

Parameters
enableLookups:boolean

The new "enable DNS lookups" flag value

setEncodedSolidusHandlingback to summary
public void setEncodedSolidusHandling(String encodedSolidusHandling)
setEnforceEncodingInGetWriterback to summary
public void setEnforceEncodingInGetWriter(boolean enforceEncodingInGetWriter)

Set the enforceEncodingInGetWriter flag.

Parameters
enforceEncodingInGetWriter:boolean

the new flag value

setMaxCookieCountback to summary
public void setMaxCookieCount(int maxCookieCount)
setMaxParameterCountback to summary
public void setMaxParameterCount(int maxParameterCount)

Set the maximum number of parameters (GET plus POST) that will be automatically parsed by the container. A value of less than 0 means no limit.

Parameters
maxParameterCount:int

The new setting

setMaxPostSizeback to summary
public void setMaxPostSize(int maxPostSize)

Set the maximum size of a POST which will be automatically parsed by the container.

Parameters
maxPostSize:int

The new maximum size in bytes of a POST which will be automatically parsed by the container

setMaxSavePostSizeback to summary
public void setMaxSavePostSize(int maxSavePostSize)

Set the maximum size of a POST which will be saved by the container during authentication.

Parameters
maxSavePostSize:int

The new maximum size in bytes of a POST which will be saved by the container during authentication.

setParseBodyMethodsback to summary
public void setParseBodyMethods(String methods)

Set list of HTTP methods which should allow body parameter parsing. This defaults to POST.

Parameters
methods:String

Comma separated list of HTTP method names

setPortback to summary
public void setPort(int port)

Set the port number on which we listen for requests.

Parameters
port:int

The new port number

setPortOffsetback to summary
public void setPortOffset(int portOffset)
setPropertyback to summary
public boolean setProperty(String name, String value)

Set a property on the protocol handler.

Parameters
name:String

the property name

value:String

the property value

Returns:boolean

true if the property was successfully set

setProxyNameback to summary
public void setProxyName(String proxyName)

Set the proxy server name for this Connector.

Parameters
proxyName:String

The new proxy server name

setProxyPortback to summary
public void setProxyPort(int proxyPort)

Set the proxy server port for this Connector.

Parameters
proxyPort:int

The new proxy server port

setRedirectPortback to summary
public void setRedirectPort(int redirectPort)

Set the redirect port number.

Parameters
redirectPort:int

The redirect port number (non-SSL to SSL)

setRejectSuspiciousURIsback to summary
public void setRejectSuspiciousURIs(boolean rejectSuspiciousURIs)
setSchemeback to summary
public void setScheme(String scheme)

Set the scheme that will be assigned to requests received through this connector.

Parameters
scheme:String

The new scheme

setSecureback to summary
public void setSecure(boolean secure)

Set the secure connection flag that will be assigned to requests received through this connector.

Parameters
secure:boolean

The new secure connection flag

setServiceback to summary
public void setService(Service service)

Set the Service with which we are associated (if any).

Parameters
service:Service

The service that owns this Engine

setURIEncodingback to summary
public void setURIEncoding(String URIEncoding)

Set the URI encoding to be used for the URI.

Parameters
URIEncoding:String

The new URI character encoding.

setUseBodyEncodingForURIback to summary
public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI)

Set if the entity body encoding should be used for the URI.

Parameters
useBodyEncodingForURI:boolean

The new value for the flag.

setUseIPVHostsback to summary
public void setUseIPVHosts(boolean useIPVHosts)

Enable the use of IP-based virtual hosting.

Parameters
useIPVHosts:boolean

true if Hosts are identified by IP, false if Hosts are identified by name.

setXpoweredByback to summary
public void setXpoweredBy(boolean xpoweredBy)

Enables or disables the generation of an X-Powered-By header (with value Servlet/2.5) for all servlet-generated responses returned by this Connector.

Parameters
xpoweredBy:boolean

true if generation of X-Powered-By response header is to be enabled, false otherwise

startInternalback to summary
protected void startInternal() throws LifecycleException

Implements abstract org.apache.catalina.util.LifecycleBase.startInternal.

Begin processing requests via this Connector.

Annotations
@Override
Exceptions
LifecycleException:
if a fatal startup error occurs
stopInternalback to summary
protected void stopInternal() throws LifecycleException

Implements abstract org.apache.catalina.util.LifecycleBase.stopInternal.

Terminate processing requests via this Connector.

Annotations
@Override
Exceptions
LifecycleException:
if a fatal shutdown error occurs
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Provide a useful toString() implementation as it may be used when logging Lifecycle errors to identify the component.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override