When you get used to using stuff on a daily basis then of course you're going to start opting for one line rather than several. but IMO you better thinking/coding like this until you get used to messing with these things.
HttpSession session = request.getSession(); session.setAttribute("foo","bar");
if you wanted t o get to the application scope to shortest way in an actions would be
ServletContext context = getServlet().getServletContext();
or words to that effect.
Might be an egg sucking lesson but seems to be this trendy coding style thats confusing you. So could very well be useful.
HTH mark
On 9 Mar 2004, at 14:15, Daniel Henrique Alves Lima wrote:
I think that i've found the problem. Please, look below :
Ciaran Hanley wrote:
Hi thanks for your reply,
I am using form based authentication. Cookies are enabled. I am storing all
session information using request.getSession() for example:
request.getSession().getServletContext().setAttribute("user", loggedUser);
stores the user bean in the session.
Ciaran, you must use request.getSession().setAttribute( "user",loggedUser );
When you use
request.getSession().getServletContext().setAttribute("user", loggedUser);
you're putting your bean at application scope...
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]