Home > Back-end >  Excuse me, how can get in the browser cookies
Excuse me, how can get in the browser cookies

Time:11-17


Login B standing after the browser's cookie, for example, in Java do I need to do to get to the browser this cookie value in the browser (not sure)?
,,, or weak weak ask Java is it possible to get?

CodePudding user response:

Java can use it in the browser interface to access request cookies data

CodePudding user response:

That how can I get B station, please return the cookies?

CodePudding user response:

Your question is a little don't know what to say, the understanding of the request may have a problem,
How do we get the browser cookies? First of all, don't know if your company have separated before and after the end,
If not, then it does not matter,
We first to understand, what we are doing Java development, do is the server, the browser can be said to be the front end (or terminal),
We obtain the front-end of cookies, that is, without the front request to your Java server, rather than a Java service initiative to request the front end,
Understand the who request, then right, front end how on your cookie Java server, this also is very simple,
If you are not a front-end engineer, you will receive only the cookie value, using the spring MVC framework, you can directly use @ CookieValue to receive the cookie value,
Methods such as: public String getCookieValue ((@ CookieValue (" sessionId ") String sessionId) {... }
Specific to see yourself what to do with how to use, the hope can help you
  • Related