💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
![](https://box.kancloud.cn/c8aff9c47a451af4f09cf119c50984fb_503x214.png) ![](https://box.kancloud.cn/f65045dba9a840f98d4a4b12a5315618_888x391.png) ![](https://box.kancloud.cn/2214c29042dcbbc6860a36f44b1ebee0_490x325.png) CookieServlet.java ~~~ package zyw.cookie; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @WebServlet(name = "CookieServlet",urlPatterns = "/cookie") public class CookieServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Cookie cookie =new Cookie("gooods","cup");//不能使用中文 response.addCookie(cookie); } } ~~~ ![](https://box.kancloud.cn/d266dfae6146ce0743d7e7eb6381f103_1324x709.png) ![](https://box.kancloud.cn/fb25f0c4158ee823ba97edad69073c7b_494x318.png) ![](https://box.kancloud.cn/2e54d33b476110801375186115c8e087_495x356.png) ![](https://box.kancloud.cn/deacab923d3157ebd1606310a0b38d49_488x287.png)