RE: Filter chaining, redirecting to an action?

2009-01-19 Thread Gustave Pheiffers
Hey Chris, You could try a Struts 2 Interceptor, which would on the intercept method either ( based on the servlet path )return a global result e.g. mailto:cbol...@gmail.com] Sent: Tuesday, 20 January 2009 11:31 a.m. To: user@struts.apache.org Subject: Filter chaining, redirecting to an action?

Re: Filter before Action servlet

2007-04-22 Thread Yannick Haudry
Hi Mahesh, Actually you can do both, filtering before and after the Action servlet, this only depends how you organize your filtering work in the doFilter() method. What will be executed before Action servlet should be before calling chain.doFilter() method and you can if you like have additional

Re: Filter

2007-01-24 Thread Taras Puchko
Hi! Request parameters should not be confused with request attributes. In general you cannot set a parameter but you can make a wrapper for the request object overriding getParameter(String), getParameterNames() and getParameterValues(String). You can also forward to a URL that contains your para

Re: Filter problem

2006-12-07 Thread Niall Pemberton
05, 2006 12:08 PM > To: 'Struts Users Mailing List' > Subject: RE: Filter problem > > > Nope. This is a struts 2 thing and I'm on 1.2.x. > > -Original Message- > From: Martin Gainty [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 05, 2006 11:21 AM

RE: Filter problem

2006-12-05 Thread George.Dinwiddie
Original Message- > From: Hehl, Thomas [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 05, 2006 12:08 PM > To: 'Struts Users Mailing List' > Subject: RE: Filter problem > > > Nope. This is a struts 2 thing and I'm on 1.2.x. > > -Origi

RE: Filter problem

2006-12-05 Thread Hehl, Thomas
Nope. This is a struts 2 thing and I'm on 1.2.x. -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 05, 2006 11:21 AM To: Struts Users Mailing List Subject: Re: Filter problem Hi Thomas- Perhaps an implementation where you register you

Re: Filter problem

2006-12-05 Thread Martin Gainty
Hi Thomas- Perhaps an implementation where you register your own listener (example located at) http://struts.apache.org/2.x/docs/can-we-access-an-actions-result.html Anyone else? M- This e-mail communication and any attachments may contain confidential and privileged information for the use of

Re: Filter mapping to URL

2006-04-09 Thread Yang Sun
Hi, Chuanjiang: I am not very clear on your question. But in general, if you have something difficult to use the built-in authentication method, you can overwrite the processRoles() method in your customized RequestProcessor and register your processor with the actionservlet in the configuration f

Re: Filter / Logging

2006-03-14 Thread atta-ur rehman
Hi, What's the url-pattern for you filter? If it's being called more than once for an action I'd guess that you have it set to intercept all the requests. Changing it to something specific, like *.do, might help. LoggingFilter *.do HTH. ATTA On 3/14/06, Hans-Peter Petek <[EMAIL PROTECTE

Re: Filter Being Called Repeatedly

2005-04-27 Thread David Evans
Hello, comments below On Wed, 2005-04-27 at 10:19, Scott Purcell wrote: > Hello, > I decided to try and implement a filter for my struts application. A filter > that would check for a session object, and if it does not exist, send the > user to a certain link. > > Anyway, I found an example in

Re: Filter Being Called Repeatedly

2005-04-27 Thread gdeschen
Oh yes... I carefully looked at the code. Apologies for misleading the list. - Glenn Dave Newton <[EMAIL PROTECTED]> 27/04/2005 10:42 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: Filter Being Called Repeatedl

Re: Filter Being Called Repeatedly

2005-04-27 Thread Dave Newton
[EMAIL PROTECTED] wrote: Umh... I believe that you don't need the return after the chain.doFilter You do, otherwise the remaining code in the filter will be executed after the request is finished being processed: filters _wrap_ a request. This is how a gzipping filter works, for example. Dav

RE: Filter Being Called Repeatedly

2005-04-27 Thread Benedict, Paul C
Scott, I recommend you use getRequestURI to check against the path (context-relative) you want to protect. Also, it's possible you're seeing hits against the images in your page (10 images will call your filter 10 times). Thanks, Paul -Original Message- From: Scott Purcell [mailto:[EMAIL

Re: Filter Being Called Repeatedly

2005-04-27 Thread Dave Newton
Scott Purcell wrote: if (req.getServletPath().equals(onFailure)) { [...] resp.sendRedirect(req.getContextPath() + onFailure); Are you sure that getServletPath() and getContextPath() + onFailure are the same thing? My impression is that getServletPath() may not be returning what you

Re: Filter Being Called Repeatedly

2005-04-27 Thread gdeschen
Umh... I believe that you don't need the return after the chain.doFilter if (req.getServletPath().equals(onFailure)) { log.info(" equals "); chain.doFilter(request, response); remove --> return; } HTH, Glenn "Scott Purcell" <[EMAIL PROTECTED]> 27/04/2005 10:19

Re: Filter Being Called Repeatedly

2005-04-27 Thread Tom Ziemer
Hi, I just looked briefly at your code, but could it be, that your filter intercepts the calls to the error page as well? So you would be redirecting, then interceptiong, redirecting, etc. Maybe you could try a different URL pattern for the filter - something like /protected/* Hope this helps.

Re: filter ?

2005-02-11 Thread Cliff Lam
Hi, I have encounter this problem before too. I have tried to get the destination jsp using a tag. 1. The tag can get the information of jsp and put it in the session. 2. Get the jsp information from the filter. Hope this help =) Cliff - Original Message - From: "Eric Lemle" <[EMAIL

Re: filter ?

2005-02-11 Thread Craig McClanahan
On Sat, 12 Feb 2005 12:49:08 +1300, Jason Lea <[EMAIL PROTECTED]> wrote: > Hmm, I think something like this might do it: > > inside your doFilter(ServletRequest request, ServletResponse response, > FilterChain chain) method: > > HttpServletRequest req=(HttpServletRequest ) request; > req.getReque

Re: filter ?

2005-02-11 Thread Jason Lea
Hmm, I think something like this might do it: inside your doFilter(ServletRequest request, ServletResponse response, FilterChain chain) method: HttpServletRequest req=(HttpServletRequest ) request; req.getRequestURI() Eric Lemle wrote: From inside a filter how do I get the name of the jsp that wa

Re: Filter for Expired Sessions

2005-01-21 Thread Eddie Bush
On Fri, 21 Jan 2005 10:57:02 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > This piece of code and this discussion is CLEARLY not appropriate to > the WIKI and is CLEARLY appropriate right where it is. This is just > more committer hybris and puffery. There should be MORE CODE on the > list. Th

Re: Filter for Expired Sessions

2005-01-21 Thread Dakota Jack
I find this all very humorous. See within: On Fri, 21 Jan 2005 09:03:33 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On Fri, 21 Jan 2005 07:29:05 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > > > > On Fri, 21 Jan 2005 08:36:14 -0500, Frank W. Zammetti > > <[EMAIL PROTECTED]> wrote: >

Re: Filter for Expired Sessions

2005-01-21 Thread Hubert Rabago
On Fri, 21 Jan 2005 09:03:33 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > While posting code and stack traces where you're having a problem is > part of the purpose of a user list, posting code examples is not > really the main point of why were here. This particular posting was > on to

Re: Filter for Expired Sessions

2005-01-21 Thread Craig McClanahan
On Fri, 21 Jan 2005 07:29:05 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > > On Fri, 21 Jan 2005 08:36:14 -0500, Frank W. Zammetti > <[EMAIL PROTECTED]> wrote: > > I never thought I'd be saying this, but I agree with Jack. :) > > > Heh! Wonders never cease! Heck, even Craig agreed with me on

Re: Filter for Expired Sessions

2005-01-21 Thread Dakota Jack
On Fri, 21 Jan 2005 08:36:14 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > I never thought I'd be saying this, but I agree with Jack. :) Heh! Wonders never cease! Heck, even Craig agreed with me once. Don't be embarrassed! Step right up there and join the majority! LOL ;-) Jack -

Re: Filter for Expired Sessions

2005-01-21 Thread Frank W. Zammetti
I never thought I'd be saying this, but I agree with Jack. :) I would say that starting a new thread along the lines of "Hey, look at this neat code I wrote" MIGHT be bad etiquette, and even then it's arguable. But Jack posted code within the context of a discussion that is specifically about c

Re: Filter for Expired Sessions

2005-01-21 Thread Dakota Jack
On Thu, 20 Jan 2005 23:19:39 -0600, Eddie Bush <[EMAIL PROTECTED]> wrote: > Leading by example is good, except when you give a poor example. It's > generally considered POOR ETIQUETTE to post code, stack traces, or > anything else that adds significant size to a message. Put it on a > site somew

Re: Filter for Expired Sessions

2005-01-20 Thread Eddie Bush
Leading by example is good, except when you give a poor example. It's generally considered POOR ETIQUETTE to post code, stack traces, or anything else that adds significant size to a message. Put it on a site somewhere and mention the URL to it in your post, or, if someone specifically requests i

Re: Filter/...

2004-12-04 Thread Craig McClanahan
e HttpServletRequestWrapper subclass within a filter, see > org.securityfilter.filter.SecurityFilter in CVS at: > http://cvs.sourceforge.net/viewcvs.py/securityfilter/securityfilter/src/shar > e/org/securityfilter/filter/SecurityFilter.java?rev=1.23&view=auto > > Regards, >

RE: Filter/...

2004-12-04 Thread Brij Naald
ecember 04, 2004 3:53 PM To: [EMAIL PROTECTED] Subject: RE: Filter/... My application needs to know the path of the servlet which is going to be called. Therefore the filter does: setLastServlet(((HttpServletRequest)request).getServletPath()); and then the filter invokes the servlet wtih a wrapper

RE: Filter/...

2004-12-04 Thread David G. Friedman
s, David -Original Message- From: Brij Naald [mailto:[EMAIL PROTECTED] Sent: Saturday, December 04, 2004 3:53 PM To: [EMAIL PROTECTED] Subject: RE: Filter/... My application needs to know the path of the servlet which is going to be called. Therefore the filter does: setLastServlet(((HttpServle

RE: Filter/...

2004-12-04 Thread Brij Naald
My application needs to know the path of the servlet which is going to be called. Therefore the filter does: setLastServlet(((HttpServletRequest)request).getServletPath()); and then the filter invokes the servlet wtih a wrapper around its request The wrapper overrides the public Object getAttribu