在下面的代码中,我试图从客户端获取名称并在会话中设置,但是 getAtrribute("unm") 返回空值...
res.setContentType("text/html");
PrintWriter op=res.getWriter();
HttpSession ss=req.getSession(true);
String sunm=(String)req.getAttribute("unm");
System.out.println(sunm);
ss.setAttribute("UserName", sunm);
op.println("<br><center>The user for this session is :"+sunm+"</center>");
请帮我...