I have 3 Servlets :
session = request.getSession(true)
BufferedReader reader = new BufferedReader(new InputStreamReader(((HttpURLConnection)
(new URL(the_url)).openConnection()).getInputStream(), Charset.forName("UTF-8")));
The problem is that : I found it when I Run Servlet1 to create the session then I run Servlet 3 to call Servlet2 ...> I got that 'servlet 2' Can not read from the created session..
But if I run Servlet2 directly from Browser I got a session.
What is the problem with Servlet2 and how can I solve it ?!
当您使用HttpClient从Servlet 3调用Servlet 2时,您错过了传递JSESSIONID cookie的机会。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.