截图在附件中
sessiontest页面在火狐下可以取到seesionid,但在ie下却变成了下载,是什么原因?(servlet页面)
代码如下:
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
HttpSession hs = req.getSession();
String sessionId = hs.getId();//取seesionid在ie下不行。。
PrintWriter pw = resp.getWriter();
resp.setContentType("text/html charset=utf-8");
pw.println("");
pw.println("
pw.println("
"+sessionId+"
");pw.println("");
pw.println("");
}