Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-31 Thread Nathan Potter
...@opendap.org] Subject: Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called. Sorry for not responding earlier, things have been a little hectic this week. I just got try it today and here is what happened: I just tried the same thing, with no problems. I made this class

RE: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-29 Thread Caldarale, Charles R
> From: Nathan Potter [mailto:n...@opendap.org] > Subject: Re: Tomcat returns HTTP status of 200 when > HttpServletResponse.sendError() called. Sorry for not responding earlier, things have been a little hectic this week. > I just got try it today and here is what happened: I ju

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-27 Thread Nathan Potter
es R wrote: From: Nathan Potter [mailto:n...@opendap.org] Subject: Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called. My guess is I have fouled up the servlet mapping... It looks o.k. to me (other than the aforementioned /docs mapping), but this discussion doe

RE: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-17 Thread Caldarale, Charles R
> From: Nathan Potter [mailto:n...@opendap.org] > Subject: Re: Tomcat returns HTTP status of 200 when > HttpServletResponse.sendError() called. > > My guess is I have fouled up the servlet mapping... It looks o.k. to me (other than the aforementioned /docs mapping), but this

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-17 Thread Nathan Potter
Chuck, Answers inline and below. On Jan 16, 2009, at 8:20 PM, Caldarale, Charles R wrote: The above mapping is not useful; since it contains no wildcards, it can only be used as an exact match for the directory, and you've disabled directory listings. Oops. My fault. In my web.xml it

RE: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-16 Thread Caldarale, Charles R
> From: Nathan Potter [mailto:n...@opendap.org] > Subject: Re: Tomcat returns HTTP status of 200 when > HttpServletResponse.sendError() called. > > docs > /docs > The above mapping is not useful; since it contains no wildcards, it can only be used

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-16 Thread Nathan Potter
, 2009, at 9:20 PM, Caldarale, Charles R wrote: From: Nathan Potter [mailto:n...@opendap.org] Subject: Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called. So do you mean something like this? default org.apache.catalina.servl

RE: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-14 Thread Caldarale, Charles R
> From: Nathan Potter [mailto:n...@opendap.org] > Subject: Re: Tomcat returns HTTP status of 200 when > HttpServletResponse.sendError() called. > > So do you mean something like this? > > default > >org.apache.catal

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-14 Thread Nathan Potter
On Jan 14, 2009, at 1:38 PM, Caldarale, Charles R wrote: From: Nathan Potter [mailto:n...@opendap.org] Subject: Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called. I mapped one of my servlets to be the default servlet: hyrax * And

RE: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-14 Thread Caldarale, Charles R
> From: Nathan Potter [mailto:n...@opendap.org] > Subject: Re: Tomcat returns HTTP status of 200 when > HttpServletResponse.sendError() called. > > I mapped one of my servlets to be the default servlet: > > hyrax > * > > > And sinc

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-13 Thread Pid
Nathan Potter wrote: > I mapped one of my servlets to be the default servlet: > > > hyrax > * > > > And since it doesn't serve static content like the Tomcat > DefaultServlet, I'm not seeing the expected behavior for the error-page > mappings. Which is kind of a bummer:

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-12 Thread Nathan Potter
On Jan 12, 2009, at 6:08 PM, Caldarale, Charles R wrote: But how do I serve them without a servlet to do it? You don't have to serve them - Tomcat's DefaultServlet does it for you, just as it does for all static resources. How do I set the value of the location element in the error page

RE: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-12 Thread Caldarale, Charles R
> From: Nathan Potter [mailto:n...@opendap.org] > Subject: Re: Tomcat returns HTTP status of 200 when > HttpServletResponse.sendError() called. > > But how do I serve them without a servlet to do it? You don't have to serve them - Tomcat's DefaultServlet does it for you,

RE: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-12 Thread Caldarale, Charles R
> From: Nathan Potter [mailto:n...@opendap.org] > Subject: Re: Tomcat returns HTTP status of 200 when > HttpServletResponse.sendError() called. > > Is sendError() using a redirect? No, more like an internal forward. > Is there a way to set the value of the element &

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-12 Thread Nathan Potter
On Jan 12, 2009, at 5:38 PM, Len Popp wrote: It sounds like error404.html isn't a plain HTML file, but a page that's generated by a servlet. Is that right? Yes. If so, the servlet should not set the status to 200 for an error page - it should leave the error status alone. I can see t

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-12 Thread Len Popp
On Mon, Jan 12, 2009 at 19:58, Nathan Potter wrote: > > On Jan 12, 2009, at 3:34 PM, Caldarale, Charles R wrote: > >> Don't think so. Does your code happen to call response.setStatus(200) >> somewhere along the way? >> >> - Chuck > > > > > Well at first I didn't think so, but now I am wondering..

Re: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-12 Thread Nathan Potter
On Jan 12, 2009, at 3:34 PM, Caldarale, Charles R wrote: Don't think so. Does your code happen to call response.setStatus(200) somewhere along the way? - Chuck Well at first I didn't think so, but now I am wondering After adding some more instrumentation I have determined that I a

RE: Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-12 Thread Caldarale, Charles R
> From: Nathan Potter [mailto:n...@opendap.org] > Subject: Tomcat returns HTTP status of 200 when > HttpServletResponse.sendError() called. > > Tomcat returns the designated page, but with an HTTP status of 200. > > If I drop the default page then I get the canned response wit

Tomcat returns HTTP status of 200 when HttpServletResponse.sendError() called.

2009-01-12 Thread Nathan Potter
Greetings, In tomcat 6.x (6.0.14 in my case) I am seeing the following behavior: If I designate default error pages in my web.xml file: 404 /docs/error404.html Then when I call HttpServletResponse.sendError(): public class DispatchServlet extends HttpServlet {