You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brandon Cruz <bc...@norvax.com> on 2002/01/15 22:19:34 UTC

Using request.getRemoteAddr() with tomcat

I need to store some information into a database that will store some unique
information based on the computer that is accessing the application.  This
works fine when clients are accessing the production server from different
machines, but causes a problem when developers are running a copy of tomcat
on their local machines.  Since everyone shares a database, all users that
are developing are returning 127.0.0.1 for request.getRemoteAddr(), and
causing multiple entries that are the same into the database.

Does anyone know of a way that I can use request.getRemoteAddr() or
something similiar to store unique information?  Can I change that IP
address so that all development machines have a unique value?

Brandon



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Using request.getRemoteAddr() with tomcat

Posted by Brandon Cruz <bc...@norvax.com>.
Nevermind this one...

-----Original Message-----
From: Brandon Cruz [mailto:bcruz@norvax.com]
Sent: Tuesday, January 15, 2002 3:20 PM
To: Tomcat Users List
Subject: Using request.getRemoteAddr() with tomcat


I need to store some information into a database that will store some unique
information based on the computer that is accessing the application.  This
works fine when clients are accessing the production server from different
machines, but causes a problem when developers are running a copy of tomcat
on their local machines.  Since everyone shares a database, all users that
are developing are returning 127.0.0.1 for request.getRemoteAddr(), and
causing multiple entries that are the same into the database.

Does anyone know of a way that I can use request.getRemoteAddr() or
something similiar to store unique information?  Can I change that IP
address so that all development machines have a unique value?

Brandon



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Using request.getRemoteAddr() with tomcat

Posted by Martin van den Bemt <ma...@isallineed.org>.
Let the development tomcats not run under localhost but under the network ip
adres (at least if that doesn't give you any security issues). Seems the
only solution in my eyes (don't have your app, so there could be better
ones..)

Mvgr,
Martin

> -----Original Message-----
> From: Brandon Cruz [mailto:bcruz@norvax.com]
> Sent: Tuesday, January 15, 2002 22:20
> To: Tomcat Users List
> Subject: Using request.getRemoteAddr() with tomcat
>
>
> I need to store some information into a database that will store
> some unique
> information based on the computer that is accessing the application.  This
> works fine when clients are accessing the production server from different
> machines, but causes a problem when developers are running a copy
> of tomcat
> on their local machines.  Since everyone shares a database, all users that
> are developing are returning 127.0.0.1 for request.getRemoteAddr(), and
> causing multiple entries that are the same into the database.
>
> Does anyone know of a way that I can use request.getRemoteAddr() or
> something similiar to store unique information?  Can I change that IP
> address so that all development machines have a unique value?
>
> Brandon
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>