Re: Problem with jsp and session on first call

2010-01-14 Thread Cimballi
Thanks, I didn't found this post before sending mine. It seems there is an inconsistant state when you use both way to access the session, but only on the first call. I tried to have a look to the root reason, but I miss Struts-Xwork deep knowledge to really understand what's happen. Don't you thi

Re: Problem with jsp and session on first call

2010-01-14 Thread Gabriel Belingueres
1. Not normal, but may be it is so because you are not using one of the recommended ways of accessing the session object. IIRC, the "#session" object is an object inside the ValueStack, not the *real* HttpSession. If you talk directly with the real session object, those sort of things may happen.

Re: Problem with jsp and session on first call

2010-01-14 Thread Cimballi
Hey Grabiel, Thanks for the link, now it works, but I two questions : 1. About my problem, in the configuration, I am using CreateSessionInterceptor to create a session. And in the logs, I can see that the first time the JSP is looking for the variable, the session exisits but is empty (while I se

Re: Problem with jsp and session on first call

2010-01-14 Thread Gabriel Belingueres
This way of obtaining a Session I think is not a good idiom. May be there are things that happens behind the scene when obtaining a session, that's probably why you are not getting a NPE the first time you call getSession(false) in your code...because "something" already created it. S2 have a Map

Problem with jsp and session on first call

2010-01-14 Thread Cimballi
Hi, I have a problem with a JSP and the session the first time I call the action which redirects to the page. The action sets a variable in the session using the code : final HttpSession session = ServletActionContext.getRequest().getSession(false); session.setAttribute(name, value); Then, the

Problem with jsp and session on first call

2010-01-14 Thread Cimballi
Hi, I have a problem with a JSP and the session the first time I call the action which redirects to the page. The action sets a variable in the session using the code : final HttpSession session = ServletActionContext.getRequest().getSession(false); session.setAttribute(name, value); Then, th