From: Chris H. <ch...@ha...> - 2004-06-23 16:47:54
|
If you want error responses to an OPTIONS error to be done in an 'open' way from an arbitary resource (e.g. an error-response Servlet) then I think the published Servlet API has to be extended. You have to be able to tell the Servlet that the original request was an OPTIONS request, yet also pass in a resource identification - which none of the existing APIs support. There is a flag to tell a Filter that an error response is needed, but not to tell a basic Servlet. I suspect it needs a new method such as doError() to go alongside doGet() doOptions() etc. Something for the JSR to chew on! Chris "Greg Wilkins" commented > > > Martin Roos wrote: > > > still i'm a bit confused by your bigtime request type morphing while > > handling the error with an error page. what method will be used > > to get the original request type & attributes if the OPTIONS request > > will be > > morphed into a GET request ? i hope that at least some way is preserved. > > if the morphing is being done i assume that in the 'error page' servlet > > i do request.getMethod() and this one will return "GET" to me, how to > > i get the knowledge which was the original http request method ? > > That's OK, as the spec is confused big time about how an error page is > to be served. > > I guess the real method should be available in a request attribute > along with the real URL etc. > > I'll chat to the JSR about this.... > |