Deprecated List (Apache Tomcat 9.0.22 API Documentation)

# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors

- Deprecated Classes
  Class and Description
  org.apache.catalina.util.ConcurrentDateFormat Unused. This will be removed in Tomcat 10. Use `ConcurrentDateFormat`
  org.apache.jasper.el.ELResolverImpl
  org.apache.jasper.el.ExpressionEvaluatorImpl
  org.apache.jasper.el.ExpressionImpl
  org.apache.jasper.el.FunctionMapperImpl
  org.apache.tomcat.dbcp.dbcp2.cpdsadapter.PStmtKeyCPDS Use `PStmtKey`.
  org.apache.jasper.el.VariableResolverImpl

- Deprecated Fields
  Field and Description
  org.apache.catalina.connector.Response.format Unused. This will be removed in Tomcat 10
  org.apache.catalina.connector.Request.formats Unused. This will be removed in Tomcat 10
  org.apache.catalina.connector.Request.GMT_ZONE Unused. This will be removed in Tomcat 10.
  org.apache.tomcat.jni.OS.IS_NETWARE Hard-coded to false since there has not been a supported Netware platform for many years. This will be removed in Tomcat 10 onwards
  org.apache.catalina.util.LifecycleMBeanBase.mserver
  org.apache.catalina.filters.CorsFilter.REQUEST_HEADER_VARY Unused. Will be removed in Tomcat 10
  org.apache.tomcat.util.http.FastHttpDateFormat.RFC1123_DATE Unused. This will be removed in Tomcat 10.
  org.apache.catalina.session.StandardSession.sessionContext
  org.apache.catalina.Globals.SSI_FLAG_ATTR Unused. This is no longer used as the CGIO servlet now has generic handling for when it is used as an include. This will be removed in Tomcat 10
  org.apache.tomcat.jni.SSL.SSL_OP_PKCS1_CHECK_1 Unsupported in the current version of OpenSSL
  org.apache.tomcat.jni.SSL.SSL_OP_PKCS1_CHECK_2 Unsupported in the current version of OpenSSL

- Deprecated Methods
  Method and Description
  org.apache.catalina.core.StandardContext.addMessageDestinationRef(MessageDestinationRef) This will be removed in Tomcat 10. Use `StandardContext.getNamingResources()` instead
  org.apache.tomcat.util.net.SocketWrapperBase.awaitReadComplete(long, TimeUnit)
  org.apache.tomcat.util.net.SocketWrapperBase.awaitWriteComplete(long, TimeUnit)
  org.apache.tomcat.jdbc.pool.PooledConnection.checkUser(String, String) use `PooledConnection.shouldForceReconnect(String, String)` method kept since it was public, to avoid changing interface.
  org.apache.catalina.core.NamingContextListener.containerEvent(ContainerEvent) The `ContainerListener` interface and implementing methods will be removed from this class for Tomcat 10 onwards.
  org.apache.catalina.ha.session.DeltaManager.deserializeDeltaRequest(DeltaSession, byte[]) Unused. This will be removed in Tomcat 10. Calling this method may result in a deadlock. See: https://bz.apache.org/bugzilla/show_bug.cgi?id=62841
  org.apache.catalina.connector.Response.encodeRedirectUrl(String) As of Version 2.1 of the Java Servlet API, use `encodeRedirectURL()` instead.
  org.apache.catalina.filters.CsrfPreventionFilter.CsrfResponseWrapper.encodeRedirectUrl(String)
  org.apache.catalina.connector.Response.encodeUrl(String) As of Version 2.1 of the Java Servlet API, use `encodeURL()` instead.
  org.apache.catalina.filters.CsrfPreventionFilter.CsrfResponseWrapper.encodeUrl(String)
  org.apache.catalina.Context.findErrorPage(String) Unused. Will be removed in Tomcat 10. Use `Context.findErrorPage(Throwable)` instead.
  org.apache.catalina.core.StandardContext.findErrorPage(String)
  org.apache.catalina.mbeans.ContextMBean.findErrorPage(String) Unused. Will be removed in Tomcat 10. Use `ContextMBean.findErrorPage(Throwable)` instead.
  org.apache.catalina.core.StandardContext.findMessageDestinationRef(String) This will be removed in Tomcat 10. Use `StandardContext.getNamingResources()` instead
  org.apache.catalina.core.StandardContext.findMessageDestinationRefs() This will be removed in Tomcat 10. Use `StandardContext.getNamingResources()` instead
  org.apache.catalina.Context.findStatusPage(int) Unused. Will be removed in Tomcat 10. Use `Context.findErrorPage(int)` instead.
  org.apache.catalina.core.StandardContext.findStatusPage(int)
  org.apache.catalina.Context.findStatusPages() Unused. Will be removed in Tomcat 10. Use `Context.findErrorPages()` instead.
  org.apache.catalina.core.StandardContext.findStatusPages()
  org.apache.tomcat.util.http.FastHttpDateFormat.formatDate(long, DateFormat) Unused. This will be removed in Tomcat 10
  org.apache.coyote.AbstractProtocol.getAcceptorThreadCount() Will be removed in Tomcat 10.
  org.apache.tomcat.util.net.AbstractEndpoint.getAcceptorThreadCount() Will be removed in Tomcat 10.
  org.apache.tomcat.dbcp.dbcp2.DelegatingResultSet.getBigDecimal(int, int) Use `DelegatingResultSet.getBigDecimal(int)`
  org.apache.tomcat.dbcp.dbcp2.DelegatingCallableStatement.getBigDecimal(int, int) Use `DelegatingCallableStatement.getBigDecimal(int)` or `DelegatingCallableStatement.getBigDecimal(String)`
  org.apache.tomcat.dbcp.dbcp2.DelegatingResultSet.getBigDecimal(String, int) Use `DelegatingResultSet.getBigDecimal(String)`
  org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getEnableAutoCommitOnReturn() Use `BasicDataSource.getAutoCommitOnReturn()`.
  org.apache.jasper.runtime.PageContextImpl.getExpressionEvaluator()
  org.apache.jasper.runtime.JspContextWrapper.getExpressionEvaluator()
  org.apache.tomcat.util.file.ConfigFileLoader.getInputStream(String)
  org.apache.catalina.ha.session.DeltaManager.getNewDeltaSession() Unused. This will be removed in Tomcat 10.
  org.apache.tomcat.util.net.NioEndpoint.getPollerThreadCount() Will be removed in Tomcat 10.
  org.apache.catalina.connector.Request.getRealPath(String) As of version 2.1 of the Java Servlet API, use `ServletContext.getRealPath()`.
  org.apache.catalina.core.ApplicationContextFacade.getServlet(String) As of Java Servlet API 2.1, with no direct replacement.
  org.apache.catalina.core.ApplicationContext.getServlet(String)
  org.apache.jasper.servlet.JspCServletContext.getServlet(String) This method has been deprecated with no replacement
  org.apache.catalina.core.ApplicationContextFacade.getServletNames() As of Java Servlet API 2.1, with no direct replacement.
  org.apache.catalina.core.ApplicationContext.getServletNames()
  org.apache.jasper.servlet.JspCServletContext.getServletNames() This method has been deprecated with no replacement
  org.apache.catalina.core.ApplicationContextFacade.getServlets() As of Java Servlet API 2.1, with no direct replacement.
  org.apache.catalina.core.ApplicationContext.getServlets()
  org.apache.jasper.servlet.JspCServletContext.getServlets() This method has been deprecated with no replacement
  org.apache.catalina.session.StandardSessionFacade.getSessionContext() As of Version 2.1, this method is deprecated and has no replacement.
  org.apache.catalina.session.StandardSession.getSessionContext() As of Version 2.1, this method is deprecated and has no replacement. It will be removed in a future version of the Java Servlet API.
  org.apache.tomcat.dbcp.dbcp2.DelegatingResultSet.getUnicodeStream(int) Use `DelegatingResultSet.getCharacterStream(int)`
  org.apache.tomcat.dbcp.dbcp2.DelegatingResultSet.getUnicodeStream(String) Use `DelegatingResultSet.getCharacterStream(String)`
  org.apache.tomcat.util.file.ConfigFileLoader.getURI(String)
  org.apache.tomcat.dbcp.dbcp2.managed.DataSourceXAConnectionFactory.getUsername() Use `DataSourceXAConnectionFactory.getUserName()`.
  org.apache.catalina.session.StandardSessionFacade.getValue(String) As of Version 2.2, this method is replaced by `StandardSessionFacade.getAttribute(java.lang.String)`.
  org.apache.catalina.session.StandardSession.getValue(String) As of Version 2.2, this method is replaced by `getAttribute()`
  org.apache.catalina.session.StandardSessionFacade.getValueNames() As of Version 2.2, this method is replaced by `StandardSessionFacade.getAttributeNames()`
  org.apache.catalina.session.StandardSession.getValueNames() As of Version 2.2, this method is replaced by `getAttributeNames()`
  org.apache.jasper.runtime.PageContextImpl.getVariableResolver()
  org.apache.jasper.runtime.JspContextWrapper.getVariableResolver()
  org.apache.catalina.tribes.transport.AbstractRxTask.isDoRun() Will be removed in Tomcat 10
  org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.isEnableAutoCommitOnReturn() Use `PoolableConnectionFactory.isAutoCommitOnReturn()`.
  org.apache.catalina.connector.Request.isRequestedSessionIdFromUrl() As of Version 2.1 of the Java Servlet API, use `isRequestedSessionIdFromURL()` instead.
  org.apache.catalina.core.ApplicationContextFacade.log(Exception, String) As of Java Servlet API 2.1, use `log(String, Throwable)` instead
  org.apache.catalina.core.ApplicationContext.log(Exception, String)
  org.apache.jasper.servlet.JspCServletContext.log(Exception, String) Use log(String,Throwable) instead
  org.apache.catalina.ha.deploy.FileMessageFactory.main(String[])
  org.apache.tomcat.dbcp.pool2.impl.CallStackUtils.newCallStack(String, boolean) use `CallStackUtils.newCallStack(String, boolean, boolean)`
  org.apache.tomcat.util.http.FastHttpDateFormat.parseDate(String, DateFormat[]) Unused. This will be removed in Tomcat 10 Use `FastHttpDateFormat.parseDate(String)`
  org.apache.catalina.manager.ManagerServlet.printResources(PrintWriter, String, Context, String, Class<?>, StringManager) Use `ManagerServlet.printResources(PrintWriter, String, javax.naming.Context, String, StringManager)` This method will be removed in Tomcat 10.x onwards
  org.apache.catalina.session.StandardSessionFacade.putValue(String, Object) As of Version 2.2, this method is replaced by `StandardSessionFacade.setAttribute(java.lang.String, java.lang.Object)`
  org.apache.catalina.session.StandardSession.putValue(String, Object) As of Version 2.2, this method is replaced by `setAttribute()`
  org.apache.catalina.core.StandardContext.removeMessageDestinationRef(String) This will be removed in Tomcat 10. Use `StandardContext.getNamingResources()` instead
  org.apache.catalina.session.StandardSessionFacade.removeValue(String) As of Version 2.2, this method is replaced by `StandardSessionFacade.removeAttribute(java.lang.String)`
  org.apache.catalina.session.StandardSession.removeValue(String) As of Version 2.2, this method is replaced by `removeAttribute()`
  org.apache.catalina.servlets.DefaultServlet.render(String, WebResource, String) Use `DefaultServlet.render(HttpServletRequest, String, WebResource, String)` instead
  org.apache.catalina.servlets.DefaultServlet.renderHtml(String, WebResource, String) Unused. Will be removed in Tomcat 10
  org.apache.catalina.servlets.DefaultServlet.renderXml(String, WebResource, Source, String) Unused. Will be removed in Tomcat 10
  org.apache.jasper.runtime.JspContextWrapper.resolveVariable(String)
  org.apache.jasper.JspC.scanFiles(File) This will be removed in Tomcat 10. Use `JspC.scanFiles()`
  org.apache.catalina.ha.session.DeltaManager.serializeDeltaRequest(DeltaSession, DeltaRequest) Unused. This will be removed in Tomcat 10. Calling this method may result in a deadlock. See: https://bz.apache.org/bugzilla/show_bug.cgi?id=62841
  org.apache.coyote.AbstractProtocol.setAcceptorThreadCount(int) Will be removed in Tomcat 10.
  org.apache.tomcat.util.net.AbstractEndpoint.setAcceptorThreadCount(int) Will be removed in Tomcat 10.
  org.apache.catalina.tribes.transport.AbstractRxTask.setDoRun(boolean) Will be removed in Tomcat 10
  org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.setEnableAutoCommitOnReturn(boolean) Use `PoolableConnectionFactory.setAutoCommitOnReturn(boolean)`.
  org.apache.tomcat.dbcp.dbcp2.BasicDataSource.setEnableAutoCommitOnReturn(boolean) Use `BasicDataSource.setAutoCommitOnReturn(boolean)`.
  org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.setMaxOpenPrepatedStatements(int) Use `PoolableConnectionFactory.setMaxOpenPreparedStatements(int)`.
  org.apache.tomcat.jni.SSLContext.setNextProtos(long, String) use `SSLContext.setNpnProtos(long, String[], int)`
  org.apache.tomcat.util.buf.CharChunk.setOptimizedWrite(boolean) Unused code. This is now a NO-OP and will be removed without replacement in Tomcat 10.
  org.apache.tomcat.util.net.NioEndpoint.setPollerThreadCount(int) Will be removed in Tomcat 10.
  org.apache.catalina.connector.Response.setStatus(int, String) As of Version 2.1 of the Java Servlet API, this method has been deprecated due to the ambiguous meaning of the message parameter.
  org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.setUnicodeStream(int, InputStream, int) Use setAsciiStream(), setCharacterStream() or setNCharacterStream()
  org.apache.jasper.JspC.setWebXmlFragment(String) Will be removed in Tomcat 10. Use `JspC.setWebXmlInclude(String)`
  org.apache.tomcat.util.buf.CharChunk.substract()
  org.apache.tomcat.util.buf.ByteChunk.substract()
  org.apache.tomcat.util.buf.ByteChunk.substract(byte[], int, int)
  org.apache.tomcat.util.buf.ByteChunk.substract(ByteBuffer) Use `ByteChunk.subtract(ByteBuffer)`. This method will be removed in Tomcat 10
  org.apache.tomcat.util.buf.CharChunk.substract(char[], int, int)
  org.apache.tomcat.util.buf.ByteChunk.substractB()

- Deprecated Constructors
  Constructor and Description
  org.apache.catalina.authenticator.BasicAuthenticator.BasicCredentials(ByteChunk, Charset) Unused. Will be removed in Tomcat 10. Use 3-arg constructor
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String) Use `PStmtKey.PStmtKey(String, String, String)`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, int, int) Use `PStmtKey.PStmtKey(String, String, String, int, int)`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String) Use `PStmtKey.PStmtKey(String, String, String)`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, int) Use `PStmtKey.PStmtKey(String, String, String, int)`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, int[]) Use `PStmtKey.PStmtKey(String, String, String, int[])`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, int, int) Use @link `PStmtKey.PStmtKey(String, String, String, int, int)`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, int, int, int) Use `PStmtKey.PStmtKey(String, String, String, int, int, int)`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, int, int, int, PoolingConnection.StatementType) Use `PStmtKey.PStmtKey(String, String, String, int, int, int, PoolingConnection.StatementType)`
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, int, int, PoolingConnection.StatementType) Use `PStmtKey.PStmtKey(String, String, String, int, int, PoolingConnection.StatementType)`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, PoolingConnection.StatementType) Use `PStmtKey.PStmtKey(String, String, String, PoolingConnection.StatementType)`.
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, PoolingConnection.StatementType, Integer) Use `PStmtKey.PStmtKey(String, String, String, PoolingConnection.StatementType, Integer)`
  org.apache.tomcat.dbcp.dbcp2.PStmtKey(String, String, String[]) Use `PStmtKey.PStmtKey(String, String, String, String[])`.

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.