You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ks...@yahoo.com on 2008/02/14 19:41:58 UTC

Remote ip Address

Is it possible to programatically direct a servlet response somewhere other than the remote ip address. 
For instance, Is there a response.setRemoteAddr() or something similar.

My ultimate goal would be to, under certain conditions, direct the servlet response to a null ip 0.0.0.0

Thanks


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

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


Re: Remote ip Address

Posted by brien colwell <xc...@gmail.com>.
I think what you're asking with setRemoteAddr() also doesn't make
sense from a protocol point of view ... what is a response without a
request?

On Thu, Feb 14, 2008 at 3:10 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
>  Hash: SHA1
>
>  Ksh,
>
>
>  ksh95@yahoo.com wrote:
>  | Is it possible to programatically direct a servlet response somewhere
>  | other than the remote ip address.
>
>  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.
>
>
>  | For instance, Is there a response.setRemoteAddr() or something similar.
>
>  No.
>
>
>  | My ultimate goal would be to, under certain conditions, direct the
>  | servlet response to a null ip 0.0.0.0
>
>  Do you mean that you simply want to discard the response? 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.
>
>  Or, better yet, decide not to send the response before you actually
>  create it, thus avoiding all foolishness of that sort.
>
>  - -chris
>  -----BEGIN PGP SIGNATURE-----
>  Version: GnuPG v1.4.8 (MingW32)
>  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>  iEYEARECAAYFAke0ylMACgkQ9CaO5/Lv0PDDHACgl2bEPVoSW5xlUcluvrOc2pmm
>  N3AAoJI4FiyIGtgd/z/By9o1ATkzWpiV
>  =HSzf
>  -----END PGP SIGNATURE-----
>
>
>
>  ---------------------------------------------------------------------
>  To start a new topic, e-mail: users@tomcat.apache.org
>  To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>  For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Remote ip Address

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ksh,

ksh95@yahoo.com wrote:
| Is it possible to programatically direct a servlet response somewhere
| other than the remote ip address.

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.

| For instance, Is there a response.setRemoteAddr() or something similar.

No.

| My ultimate goal would be to, under certain conditions, direct the
| servlet response to a null ip 0.0.0.0

Do you mean that you simply want to discard the response? 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.

Or, better yet, decide not to send the response before you actually
create it, thus avoiding all foolishness of that sort.

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

iEYEARECAAYFAke0ylMACgkQ9CaO5/Lv0PDDHACgl2bEPVoSW5xlUcluvrOc2pmm
N3AAoJI4FiyIGtgd/z/By9o1ATkzWpiV
=HSzf
-----END PGP SIGNATURE-----

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


RE: Remote ip Address

Posted by Peter Crowther <Pe...@melandra.com>.
> From: ksh95@yahoo.com [mailto:ksh95@yahoo.com]
> Is it possible to programatically direct a servlet response
> somewhere other than the remote ip address.
> For instance, Is there a response.setRemoteAddr() or
> something similar.
>
> My ultimate goal would be to, under certain conditions,
> direct the servlet response to a null ip 0.0.0.0

If you want to swallow output under certain conditions, why not use a Filter or Valve?  Much easier than trying to redirect output.

(And in answer to your original question: no.)

                - Peter

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