Zamítnuté třídy a metody servletu Jakarta byly odebrány

Zamítnuté metody a třídy servletu Jakarta byly odebrány v servletu Jakarta 6.0. Odeberte použití těchto tříd a metod z vaší aplikace.

Odebrané třídy servletu Jakarta:

Odebrané třídy servletu Jakarta

Náhradní třídy servletu Jakarta

jakarta.servlet.http.HttpSessionContext

Není. Třída jakarta.servlet.http.HttpSessionContext byla odebrána z bezpečnostních důvodů bez náhrady.

jakarta.servlet.http.HttpUtils

Tato třída byla zamítnuta. Metody na rozhraních požadavku poskytují podobné funkce. HttpServletRequest.getRequestURL() může nahradit funkčnost HttpUtils.getRequestURL(HttpServletRequest) a HttpServletRequest.getParameterMap() může nahradit funkčnost HttpUtils.parsePostData(int, ServletInputStream)​ nebo HttpUtils.parseQueryString(String)​.

jakarta.servlet.SingleThreadModel

Není

Odebrané metody servletu Jakarta:

Odebrané metody servletu Jakarta

Náhradní metody servletu Jakarta

jakarta.servlet.http.HttpServletRequest.isRequestedSessionIdFromUrl() a jakarta.servlet.http.HttpServletRequestWrapper.isRequestedSessionIdFromUrl()

HttpServletRequest.isRequestedSessionIdFromURL() a HttpServletRequestWrapper.isRequestedSessionIdFromURL()

jakarta.servlet.http.HttpServletResponse.encodeUrl(String) a jakarta.servlet.http.HttpServletResponseWrapper.encodeUrl(String)

HttpServletResponse.encodeURL(String) a HttpServletResponseWrapper.encodeURL(String)

jakarta.servlet.http.HttpServletResponse.encodeRedirectUrl(String) a jakarta.servlet.http.HttpServletResponseWrapper.encodeRedirectUrl(String)

HttpServletResponse.encodeRedirectURL(String) a HttpServletResponseWrapper.encodeRedirectURL(String)

jakarta.servlet.http.HttpServletResponse.setStatus(int, String) a jakarta.servlet.http.HttpServletResponseWrapper.setStatus(int, String)

Chcete-li nastavit stavový kód, použijte setStatus(int). Chcete-li odeslat chybu s popisem, použijte sendError(int, String).

jakarta.servlet.http.HttpSession.getSessionContext()

Není

jakarta.servlet.http.HttpSession.getValue(String)

HttpSession.getAttribute(String)

jakarta.servlet.http.HttpSession.getValueNames()

HttpSession.getAttributeNames()

jakarta.servlet.http.HttpSession.putValue(String, Object)

HttpSession.setAttribute(String, Object)

jakarta.servlet.http.HttpSession.removeValue(String)

HttpSession.removeAttribute(String)

jakarta.servlet.ServletContext.getServlet(String)

Není. Dříve tato metoda vždy vrátila hodnotu null.

jakarta.servlet.ServletContext.getServlets()

Není. Dříve tato metoda vždy vrátila prázdný výčet.

jakarta.servlet.ServletContext.getServletNames()

Není. Dříve tato metoda vždy vrátila prázdný výčet.

jakarta.servlet.ServletContext.log(Exception, String)

ServletContext.log(String, Throwable)

jakarta.servlet.ServletRequest.getRealPath(String) a jakarta.servlet.ServletRequestWrapper.getRealPath(String)

ServletContext.getRealPath(String)

jakarta.servlet.UnavailableException.getServlet()

Není

Odebrané konstruktory servletu Jakarta:

Odebrané konstruktory servletu Jakarta

Náhradní konstruktory servletu Jakarta

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

UnavailableException(String, int)

jakarta.servlet.UnavailableException(jakarta.servlet.Servlet, String)

UnavailableException(String)

Toto pravidlo má automatickou opravu, která nahradí zamítnuté třídy a metody servletu Jakarta jejich odpovídajícím nahrazením. Zkopírujte vlastní konfiguraci do svého souboru sestavení aplikace a povolte automatizaci opravy.

Další informace o migraci produktu Jakarta 10 viz téma Rozdíly mezi Jakarta Servlet 6.0 a 5.0.

Další informace viz poznámky k zamítnutí v dokumentaci Javadoc Servlet 5.0.