Why Ajax calls don't renew session timeout on Tomcat server?

2013-05-15 Thread Norah Jones
Hi, I have a web application which is deployed on a Tomcat server (version 7). I have set the session timeout value as 10 minutes in the web.xml file. In pages with no Ajax call, the session time out value is reset promptly. But it is not renewed on pages with Ajax calls. Web application is t

Re: Why Ajax calls don't renew session timeout on Tomcat server?

2013-05-15 Thread Paul Benedict
You don't give enough information to diagnose the problem, but I imagine you're not passing the session information (e.g., jsessionid cookie) back to the server. On Wed, May 15, 2013 at 12:30 PM, Norah Jones wrote: > Hi, > > I have a web application which is deployed on a Tomcat server (version

Cookie in struts2

2013-05-15 Thread john lee
I have no difficulty to handle cookie in struts 1, but have lots of error in struts 2 i have the following program public class SecurityVerifySessionIntercepter extends AbstractInterceptor implements ServletResponseAware, ServletRequestAware { Map session= ActionContext.getContext().ge

Re: Cookie in struts2

2013-05-15 Thread Dave Newton
Import the Cookie class, and get the cookies from the request, not the class of the request? Dave On Wed, May 15, 2013 at 4:56 PM, john lee wrote: > > > I have no difficulty to handle cookie in struts 1, but have lots of error > in struts 2 > > i have the following program > > > public class

Re: Cookie in struts2

2013-05-15 Thread Chris Pratt
You might want to look into the CookiesAware interface. It's a better way of accessing cookies. Here's a good post on handling Cookies in Struts 2: http://omkarp.blogspot.com/2007/07/working-with-cookies-in-struts2.html (*Chris*) On Wed, May 15, 2013 at 2:14 PM, Dave Newton wrote: > Import

Re: Cookie in struts2

2013-05-15 Thread Dave Newton
(With the caveat that the interface is really for actions, while the OP seems to be working inside an interceptor.) Dave On Wed, May 15, 2013 at 5:25 PM, Chris Pratt wrote: > You might want to look into the CookiesAware interface. It's a better way > of accessing cookies. Here's a good post

return Action.LoginAction;

2013-05-15 Thread john lee
for struts 2,      i follow the example from the web to use 'Action.x'  (xxx is actual action name), but the compile report the following error cannot find symbol symbol  : variable Action location: class SecurityVerifySessionIntercepter   return Action.LoginAction;   which librar

Re: Cookie in struts2

2013-05-15 Thread Chris Pratt
Ah, my bad, you are correct, Dave. John, like Dave pointed out, you should be using: import javax.servlet.Cookie; Cookie[] cookieList = ServletActionContext.getRequest().getCookies(); (*Chris*) On Wed, May 15, 2013 at 2:41 PM, Dave Newton wrote: > (With the caveat that the interface is rea

Re: return Action.LoginAction;

2013-05-15 Thread Dave Newton
... That makes no sense; "Action" isn't a "global variable", and we don't know what you're actually *trying* to return, so it's impossible to help. Dave On Wed, May 15, 2013 at 5:49 PM, john lee wrote: > > > for struts 2, > > > >i follow the example from the web to use 'Action.x' (x

Re: Cookie in struts2

2013-05-15 Thread john lee
thanks, in my program, after i import it, the compile error is gone. From: Chris Pratt To: Struts Users Mailing List Cc: john lee Sent: Wednesday, May 15, 2013 4:54 PM Subject: Re: Cookie in struts2 Ah, my bad, you are correct, Dave. John, like Dave po