-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ksh,

[EMAIL PROTECTED] wrote:
| | Not using the servlet container in any usual way. You could email
| the | response somewhere or something like that, or POST it to
| another URL or | whatever. I'm not sure why you'd want to do that,
| though.
|
| I'm not sure I follow you here. POST is an http request...how would
| that prevent a http response.

Right. Your question kind of didn't make sense, so my response doesn't
really make sense, either. ;)

| | Do you mean that you simply want to discard the response?
|
| Exactly

Okay. The proper way to do this is to make your decision to suppress a
response /before/ any response is generated. You cannot really /not/
respond to a request. You should at least send a blank response, perhaps
using an appropriate HTTP status code (like 200 OK, 201 CREATED, 202
ACCEPTED, or 204 NO CONTENT).

Another way would be to buffer the response and then throw it out later.

| | The proper way | to do that is to buffer any response you /might/
| send, and then simply | do not send it at all if you decide not to.
|
| But wouldn't that tie up memory?

Yes, which is why you shouldn't do it.

|
| | Or, better yet, decide not to send the response before you actually
|  | create it, thus avoiding all foolishness of that sort.
|
| That would be excellent, although I'm not sure how I would go about
| choosing not the send the response. Would I have to hack the source
| code.

How do you know that you don't want to send a response?

This is definitely going to require you to write some code. If you don't
have access to the source code of the app you are trying to modify, and
you can't decide before the request is processed, then you will have to
buffer the response and then choose not to send it afterward (which
/will/ eat up memory). There's pretty much no way around that.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAke53f8ACgkQ9CaO5/Lv0PDwYQCgwGQaifUl6H9lmiSYQkvwTZEg
1S0Ani97C6/LTenNuU6jbzm4kevD5Fio
=IB/P
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to