Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Issue with getSession().setAttribute()
Joined: May 16, 2003
Aug 31, 2003 13:17:00
What's wrong with the followin' code?
1) Settin' the session attribute:
2) Checkin' if the user is logged:
status = request.getSession().getAttribute("logged") == null ? "deny" : "allow";
// do something here...
The problem is that getAttribute() always returns null...
Joined: Aug 02, 2003
Sep 01, 2003 05:53:00
you don't have to use request.getSession() but session. If you always get attribute null, maybe user is always null or the session is invalidated at some point. You can check with session.isNew().
I agree. Here's the link:
subject: Issue with getSession().setAttribute()
I can't get my query cache to work...
Struts, tiles and getRequestURL()?
How to implement authentication for each jsp page
Correct way to check Session timeout?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013