servlets - Java EE Filters not able to get cookies? -


Why can not the cookies referenced from a servlet filter be enabled? It just seems to me that Java EE will not allow you to clean the cookie values:

  Public Zero doFilter (Servlet Request Request, Servicelet Response Response, Filter China Series) Servlet Upation, IOException { request. }  

ServletRequest does not support getCookies (as is the case with HttpServletRequest).

To get the cookie you need to put it on the HTTPReleaseLaired .

  HTPASRquareRequest http Rike = (HTTPServeletture) request;  

The reason is that the ServletResponse class does not support cookies because the protocol is not required in a ServletRequest , you can Make sure that there are cookies cookies are an HTP thing.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -