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?
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
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
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
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
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
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
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
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
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
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
[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
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
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
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
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.
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
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
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
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
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:
>
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
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
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
-
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
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
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
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,
>
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
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
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
31 matches
Mail list logo