Deprecated API

Contents

Deprecated Interfaces

HttpSessionContext
This class has been deprecated for security reasons.
We don't want serlvets messing around in other sessions.
However convenient that might be.

Deprecated Methods

javax.servlet.http.HttpServletRequest.isRequestedSessionIdFromUrl()
Use isRequestedSessionIdFromURL
javax.servlet.http.HttpServletResponse.setStatus(int,String)
only errors should give an extra error message, if you only want to set the status code use setStatus(int).
javax.servlet.http.HttpServletResponse.encodeUrl(String)
use encodeURL()
javax.servlet.http.HttpServletResponse.encodeRedirectUrl(String)
use encodeRedirectURL()
javax.servlet.http.HttpSession.getSessionContext()
HttpSessionContext has been depricated for security reasons.
javax.servlet.http.HttpSessionContext.getSession(String)
This method should always return null
javax.servlet.http.HttpSessionContext.getIds()
This method should always return an empty enumeration
javax.servlet.ServletContext.log(Exception,String)
Use log(String, Throwable) which is more general.
javax.servlet.ServletContext.getServlet(String)
Always returns null.
javax.servlet.ServletContext.getServlets()
Always returns an empty Enumeration.
javax.servlet.ServletContext.getServletNames()
Always returns an empty Enumeration.
javax.servlet.ServletRequest.getRealPath(String)
Should use getRealPath from the current ServletContext.
javax.servlet.UnavailableException.getServlet()

Deprecated Constructors

javax.servlet.UnavailableException.UnavailableException(Servlet,String)
javax.servlet.UnavailableException.UnavailableException(int,Servlet,String)