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 just tried the same

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

2009-01-27 Thread Nathan Potter
Tomcat/6.0.14 logs. And in my debugger it looks like the getRelativePath() never gets called. It dies long before that. Any ideas? N On Jan 17, 2009, at 9:13 AM, Caldarale, Charles R wrote: From: Nathan Potter [mailto:n...@opendap.org] Subject: Re: Tomcat returns HTTP status of 200 when

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

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 discussion does trigger

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

2009-01-16 Thread Nathan Potter
a jar file from somewhere? Nathan On Jan 14, 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? servlet

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. servlet-mapping servlet-namedocs/servlet-name url-pattern/docs/url-pattern /servlet-mapping The above mapping is not useful

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: servlet-mapping servlet-namehyrax/servlet-name url-pattern*/url-pattern

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: servlet-mapping servlet

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? servlet servlet-namedefault/servlet-name servlet-class

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: servlet-mapping servlet-namehyrax/servlet-name url-pattern*/url-pattern /servlet-mapping And since it doesn't serve static content like the Tomcat DefaultServlet, I'm not seeing the

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: error-page error-code404/error-code location/docs/error404.html/location /error-page Then when I call

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 with an HTTP status of 404

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

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 n...@opendap.org 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

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

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 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, just as it does for all

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