A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
PostGIS in Action
this week in the
JDBC and Relational Databases
Java Advanced Topics Training
Java in General
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...
Correct way to check Session timeout?
Struts, tiles and getRequestURL()?
How to implement authentication for each jsp page
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015