In the following code i am trying to get the name from client and set in the session but there getAtrribute("unm") returning the null value...
    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>");
please help me...
 
     
     
    