On Wed, 20 Aug 2003, Viral_Thakkar wrote: > Date: Wed, 20 Aug 2003 17:19:28 +0530 > From: Viral_Thakkar <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: RE: Session expired > > It seems that there are two solutions for same problem, one using the > RequestProcessor and other one using the servlet 2.3 Filter. >
The RequestProcessor solution *only* works if all requests are sent through the controller servlet, and there are zero direct links to a JSP page (even by a user manually typing in a URL, or having bookmarked a JSP URL). The Filter case will catch those, if you use an appropriate mapping on your Filter. > Which one is the better solution from performance point of view or other > parameters if any, we can use to find better solution? > The RequestProcessor approach is slightly less overhead, but quite frankly there are very few applications in the world where this should be the driving concern. You should really be thinking more about whether it works reliably in all cases, which solution is more maintainable, and considerations like that. The only time performance should affect a decision like this is when you're CPU bound in the servlet container -- and that is a vanishingly rare situation in production applications, where the servlet container is often sitting around waiting for the database or the network to get done with its work. Even if you are CPU bound, it's probably cheaper to spend a little money on a faster CPU than to suffer more work or less reliable behavior. > Viral Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

