Agreed. What you want is a Servlet filter, not a Struts interceptor.

On Tue, Jul 9, 2013 at 9:54 AM, Sreekanth S. Nair <
sreekanth.n...@egovernments.org> wrote:

> I doubt struts2 interceptor work like a filter, just like in ur pseudo
> code. In filter we can specify
> what to do with request and response by adding code before and
> after chain.doFilter(request, response). In Interceptor intercept method
> will always get executed before and after req & resp.
>
>
>
>
> --
> Thanks & Regards
> Srikanth
> Software Developer
> --------------------------------
> eGovernments Foundations
> www.egovernments.org
> Mob : 9980078913
> --------------------------------
>
>
> On Tue, Jul 9, 2013 at 6:37 PM, Felipe Lorenz <
> felipe.lor...@idealogic.com.br> wrote:
>
> > I dont think it is possible. But I believe you can just ignore the
> > response and do nothing with that.
> >
> > I am not sure if I understand your question. But an interceptor has only
> > one call per request/response. So your code could like this:
> >
> >
> > public class Interceptor {
> >
> >          methodXXXX {
> >                  removeSpaceFromRequest();
> >                  String resp = invoke();
> >                  //here, you do nothing with the response.
> >                  return resp;
> >          }
> >
> > }
> >
> > Felipe Lorenz
> > Gerente de Projetos
> > Idealogic Software
> > Fone: (51) 3715 5523 - (51) 3715 5548
> > www.idealogic.com.br
> >
> > Em 09/07/2013, às 09:13, Sreekanth S. Nair escreveu:
> >
> > > Yes, i have an Interceptor basically to Trimming of input values, i
> don't
> > > want to do this to be happened while request coming back with response.
> > >
> > > --
> > > Thanks & Regards
> > > Srikanth
> > > Software Developer
> > > --------------------------------
> > > eGovernments Foundations
> > > www.egovernments.org
> > > Mob : 9980078913
> > > --------------------------------
> > >
> > >
> > > On Tue, Jul 9, 2013 at 5:41 PM, <umeshawas...@gmail.com> wrote:
> > >
> > >> Any specific reason to do that?
> > >> ------Original Message------
> > >> From: Sreekanth S. Nair
> > >> To: Struts Users Mailing List
> > >> ReplyTo: Struts Users Mailing List
> > >> Subject: How to make interceptor to be invoked only for HTTP Request
> not
> > >> for Response
> > >> Sent: Jul 9, 2013 5:33 PM
> > >>
> > >> How to make interceptor to be invoked only for HTTP Request not for
> > >> Response
> > >>
> > >>
> > >>
> > >> Sent from BlackBerry® on Airtel
> >
> >
>



-- 
Cheers,
Paul

Reply via email to