wood burning stoves*
The moose likes Servlets and the fly likes Problem with session context.(Urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem with session context.(Urgent)" Watch "Problem with session context.(Urgent)" New topic
Author

Problem with session context.(Urgent)

niranjan pulipati
Greenhorn

Joined: Jul 04, 2001
Posts: 4
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
Beksy Kurian
Ranch Hand

Joined: Jul 11, 2001
Posts: 254
I am guessing here..
change it o req.getParameter("sessionid") and try
Beksy
Micah Kornfield
Greenhorn

Joined: Jul 23, 2001
Posts: 8
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
Sam Dalton
Author
Ranch Hand

Joined: Jul 26, 2001
Posts: 170
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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with session context.(Urgent)
 
Similar Threads
urgent
Urgent....
urgent
urgent
URGENT!!