RE: [OT] Re: Filter behaviour

2015-06-29 Thread George Stanchev
tion 4.4) indicating the SOAP processing error." George [1] http://www.w3.org/TR/2000/NOTE-SOAP-2508/#_Toc478383529 -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Monday, June 29, 2015 8:56 AM To: Tomcat Users List Subject: Re: [OT] Re: Filter behaviour Geo

Re: [OT] Re: Filter behaviour

2015-06-29 Thread André Warnier
st Subject: [OT] Re: Filter behaviour On Sat, Jun 27, 2015 at 8:37 AM, Konstantin Kolinko wrote: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { boolean iAmNotAuthorized = true; if (iAmNot

RE: [OT] Re: Filter behaviour

2015-06-29 Thread George Stanchev
For SOAP, you *MUST* send back 500 or 400 with your SOAP fault back. [1] http://www.w3.org/TR/soap12-part2/#tabresstatereccodes -Original Message- From: Leo Donahue [mailto:donahu...@gmail.com] Sent: Saturday, June 27, 2015 11:45 PM To: Tomcat Users List Subject: [OT] Re: Filter

Re: [OT] Re: Filter behaviour

2015-06-28 Thread André Warnier
Leo Donahue wrote: On Sat, Jun 27, 2015 at 8:37 AM, Konstantin Kolinko wrote: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { boolean iAmNotAuthorized = true; if (iAmNotAuthorized)

[OT] Re: Filter behaviour

2015-06-27 Thread Leo Donahue
On Sat, Jun 27, 2015 at 8:37 AM, Konstantin Kolinko wrote: > >> > > public void doFilter(ServletRequest request, ServletResponse > response, > > FilterChain chain) throws IOException, ServletException > > { > > boolean iAmNotAuthorized = true; > > > > if (iAmNotAuthorized)

Re: Filter behaviour

2015-06-27 Thread Konstantin Kolinko
>> >> > The scenario I'm working on is a web service. The web service has >> > three filters, in order they are: throttle filter, authentication >> > filter, logging filter. >> > >> > If a user is not authenticated, the following code "should" break >> > out of the filter chain and redirect the u

Re: Filter behaviour

2015-06-26 Thread Leo Donahue
On Fri, Jun 26, 2015 at 11:09 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Leo, > > > > > If I use a return statement to break out of a filter, what should > > happen? Will the next filter run? > > No. The Filter is responsi

Re: Filter behaviour

2015-06-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Leo, On 6/26/15 10:38 AM, Leo Donahue wrote: > On Fri, Jun 26, 2015 at 1:42 AM, André Warnier > wrote: > >> >> I must admit that your question above was a bit difficult to >> follow, in terms of if/then/else/unless, particularly late at >> night.

Re: Filter behaviour

2015-06-26 Thread Konstantin Kolinko
2015-06-25 23:11 GMT+03:00 Leo Donahue : > public void doFilter(ServletRequest request, ServletResponse response, > FilterChain chain) throws IOException, ServletException > > Assuming you have only a single Filter configured in web.xml > > Assuming you have logic in a doFilter that checks the valu

Re: Filter behaviour

2015-06-26 Thread Leo Donahue
On Fri, Jun 26, 2015 at 1:42 AM, André Warnier wrote: > > I must admit that your question above was a bit difficult to follow, in > terms of if/then/else/unless, particularly late at night. Yes, you are right. Sorry about that. I was trying to walk the line between saying too much and not eno

Re: Filter behaviour

2015-06-25 Thread André Warnier
Leo Donahue wrote: public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException Assuming you have only a single Filter configured in web.xml Assuming you have logic in a doFilter that checks the value of a boolean. If the boolean

Re: Filter behaviour ( settinf Content-Length header )

2014-02-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jose, On 2/27/14, 3:22 PM, Christopher Schultz wrote: > Jose, > > On 2/27/14, 1:29 PM, Jose María Zaragoza wrote: >> 2014-02-27 17:24 GMT+01:00 Konstantin Kolinko >> : >>> 2014-02-27 18:31 GMT+04:00 Jose María Zaragoza >>> : And what d

Re: Filter behaviour ( settinf Content-Length header )

2014-02-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jose, On 2/27/14, 1:29 PM, Jose María Zaragoza wrote: > 2014-02-27 17:24 GMT+01:00 Konstantin Kolinko > : >> 2014-02-27 18:31 GMT+04:00 Jose María Zaragoza >> : >>> >>> And what do you recommend to me for forcing to return a >>> Content-Type ? Som

Re: Filter behaviour ( settinf Content-Length header )

2014-02-27 Thread Jose María Zaragoza
2014-02-27 17:24 GMT+01:00 Konstantin Kolinko : > 2014-02-27 18:31 GMT+04:00 Jose María Zaragoza : >> >> And what do you recommend to me for forcing to return a Content-Type ? >> Some weird clients require it >> >> If I cannot do it with a Filter , where can I do it ? >> > > You can do it in a Fil

Re: Filter behaviour ( settinf Content-Length header )

2014-02-27 Thread Konstantin Kolinko
2014-02-27 18:31 GMT+04:00 Jose María Zaragoza : > > And what do you recommend to me for forcing to return a Content-Type ? > Some weird clients require it > > If I cannot do it with a Filter , where can I do it ? > You can do it in a Filter. As I said, 1. The header must be set before writing a

Re: Filter behaviour ( settinf Content-Length header )

2014-02-27 Thread Lorenzo Fini
Did you try in the servlet? 2014-02-27 15:31 GMT+01:00 Jose María Zaragoza : > Thanks > > > And what do you recommend to me for forcing to return a Content-Type ? > Some weird clients require it > > If I cannot do it with a Filter , where can I do it ? > > 2014-02-27 12:41 GMT+01:00 Konstantin

Re: Filter behaviour ( settinf Content-Length header )

2014-02-27 Thread Jose María Zaragoza
Thanks And what do you recommend to me for forcing to return a Content-Type ? Some weird clients require it If I cannot do it with a Filter , where can I do it ? 2014-02-27 12:41 GMT+01:00 Konstantin Kolinko : > 2014-02-27 12:18 GMT+04:00 Jose María Zaragoza : >> Hello: >> >> I'm using Tomcat

Re: Filter behaviour ( settinf Content-Length header )

2014-02-27 Thread Konstantin Kolinko
2014-02-27 12:18 GMT+04:00 Jose María Zaragoza : > Hello: > > I'm using Tomcat 6.0.24 and I'm testing how to return Content-Length header > So I've defined a Filter and declared in web.xml of my web application > > If I do this: > > HttpServletResponse httpResponse = (HttpServletResponse) response;