I have a doubt..in sessioncontext.. i have few lines of code as private HttpSessionContext m_SessionContext; String sessionid= (String)req.getAttribute("sessionid"); m_SessionContext = req.getSession(true).getSessionContext(); HttpSession session1 = m_SessionContext .getSession(sessionid);
Here i am getting the "sessionid"from the jsp page. when i run this code i am getting session as null. why is it so.. Please help me..Urgent Thanks & Regards Niranjan
another guess but was getSessionContext deprecated, i cannot recall but i though i might have it someplace and i also thought i read that it was redone to just return null when it was deprecated.
God help us if computers ever unite against us<BR>When computers get together to make decisions, they form a Beowulf cluster. When humans get together to make decisions, they form a comittee. Need I say more?<P>-- archnerd on slashdot
getSessionContext() was indeed deprecated as of version 2.1 of the servlet spec. In fact the entire concept of the SessionContext was deprected (as well as the interface HttpSessionContext. What exactly do you want to do? There should be another way around this.
<a href="http://www.samjdalton.com" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of [http://www.amazon.com/exec/obidos/tg/detail/-/1590592255/qid=1068633302//ref=sr_8_xs_ap_i0_xgl14/104-4904002-9274339?v=glance&s=books&n=507846]Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861007701/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/186100561X/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>