Re: Servlets / How can we discard a request?
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 10 Mar 2007 16:36:56 -0000
Daniel Pitts wrote:
On Mar 9, 6:36 pm, Covington Bradshaw <cog.b...@xxxxxxxxxxxxx> wrote:
Hi,
In a servlet filter or servlet, how can we discard a request?
I.E. receive a given http request and simply decide to reject it
without answering the client with any response.
Well, at the worst, you should return a 404 response. Its only polite.
If you don't want any response, why have a servlet at all?
Or one of the other 4xx or 5xx responses. I agree that it makes no sense not
to respond at all -- if there's a reason why the server doesn't want to service
this request then it should /say/ so.
And, anyway, if the server just drops the connection without sending a standard
HTTP response, then the client will almost certainly retry -- thus increasing
the load on your server...
-- chris
.
- References:
- Servlets / How can we discard a request?
- From: Covington Bradshaw
- Re: Servlets / How can we discard a request?
- From: Daniel Pitts
- Servlets / How can we discard a request?
- Prev by Date: Re: Java 1.6 becoming idiot-proof or just slack?
- Next by Date: Re: String based hashCode
- Previous by thread: Re: Servlets / How can we discard a request?
- Next by thread: Re: Servlets / How can we discard a request?
- Index(es):
Relevant Pages
|