Re: Question about session time-out using Listener

2006-09-25 Thread Tamas Szabo
Hi, Sorry, I had to sleep in the meantime ;-). Yes, of course you will need to have the SessionInactivityFilter and it's dependencies in your webapp. The easiest is probably to just include the jar containing it. To do that get the binary distribution of JWP: http://prdownloads.sourceforge.net/

Re: Question about session time-out using Listener

2006-09-25 Thread mosho
Hi Tamas I am getting this error. do I need to inculde class SessionInactivityFilter or implement this class. I didn't understand how it is going to work. Servlet error: Error loading filter 'SessionInactivityFilter', filter-class 'javawebparts.filter.SessionInactivityFilter' not found This is

Re: Question about session time-out using Listener

2006-09-25 Thread Tamas Szabo
Did you also map the filter to /* with a filter-mapping? Just after the filter element you declared you should have: SessionInactivityFilter< /filter-name> /* This is the first think I can think of. If you think that you got that right it would be good if I could see your whole web.xml fil

Re: Question about session time-out using Listener

2006-09-25 Thread mosho
Thanks Tamas. That seems to get rid of the errors but it doesn't work. When the session expires, it doesn't take me to any page, I tried forwarding to struts actions and .jsp files, it doesn;t work for both. Any idea? SessionInactivityFilter javawebparts.filter.SessionInactivityFilter

Re: Question about session time-out using Listener

2006-09-25 Thread Tamas Szabo
Yes, you probably just added the filter at the end of the web.xml, after the element that you already had in there. You have to declare the elements in the order defined by the DTD. For 2.3 this is: So try to have the declaration of the filter and filter-mapping just before the listener eleme

Re: Question about session time-out using Listener

2006-09-25 Thread mosho
Thanks for all your replies. My application is a struts application. I tried to use SessionInactivityFilter, i am getting compilation errors. I just have to include the following in my xml file or I need to do something else also: SessionInactivityFilter javawebparts.filter.SessionInactivit

Re: Question about session time-out using Listener

2006-09-25 Thread Tamas Szabo
Hi, You can use SessionInactivityFilter from the JavaWebParts project if you don't want to reinvent the wheel: Doc: http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/SessionInactivityFilter.html JWP Home Page: http://javawebparts.sourceforge.net/ Good Luck, Tamas http://jav

RE: Question about session time-out using Listener

2006-09-24 Thread Strachan, Paul
perhaps use a servlet filter to do this - you can simply map the filter to whatever urls you wish to apply rather than remembering to include some code in each and every jsp/action class etc e.g. in your doFilter(ServletRequest, ServletResponse, FilterChain) method: 1. HttpSession session = reque

Re: Question about session time-out using Listener

2006-09-24 Thread Li
Simply you should: 1. a. create a tag handler "MyTagHandler" by extending " javax.servlet.jsp.tagext.TagSupport" b.create two method : "doStartTag", "doEndTag" c. in "doEndtag(return type int)" you should get "HttpSession" object, if you session object is not null, return "(EVAL_

Re: Question about session time-out using Listener

2006-09-24 Thread mosho
do you have any example to do this? Thanks. Li-3 wrote: > > you can create a taghandler, much simpler and flexible > > On 9/25/06, mosho <[EMAIL PROTECTED]> wrote: >> >> >> >> Hi All, >> >> When session times out I want to forward a request to another page.Is it >> possible to do it with HttpSe

Re: Question about session time-out using Listener

2006-09-24 Thread Li
you can create a taghandler, much simpler and flexible On 9/25/06, mosho <[EMAIL PROTECTED]> wrote: Hi All, When session times out I want to forward a request to another page.Is it possible to do it with HttpSessionListener? How can I get response object so that I can redirect to another pag