Hi Ranchers,
I am trying with some simple
servlet programs . I am printing the session object within the doget()method. And also tried to print the session object within the if {} block. Here this session value prints null.Is that the reason that the session is not initialized. i have placed this snippet in doget().
I expect someone to put a light on this ?
// Save and get a session-scoped value
HttpSession session = req.getSession(false);
if (session != null) {
session.setAttribute("session-param", "session-value");
value = session.getAttribute("session-param");
}
Thanks.