Redian新闻
>
How do I send cookies from a servlet?
avatar
How do I send cookies from a servlet?# Java - 爪哇娇娃
b*g
1
HTTP is a stateless protocol, which makes tracking user
actions difficult.
One solution is to use a cookie, which is a small piece of
data sent by a
web browser every time it requests a page from a particular
site. Servlets,
and CGI scripts, can send cookies when a HTTP request is
made - though as
always, there is no guarantee the browser will accept it.
Cookies are represented by the javax.servlet.http.Cookie
class. Cookie has
a single constructor, which takes two strings (a key and a
value).
/
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。