re-direct to local machine without shown ip address

J

JAVA Rookie

Hi, I am working on a intranet app, and when I re-direct user's request to
another local machine which has tomcat installed, how can I avoid users can see
http://192.168.x.x in their url?
And how can I put, for example, like http://local-apps.com instead.
which file(s) I need to modify?
Thanks.
 
A

Anton Spaans

Take a look at the java.net.InetAddress class (use the static
getByName(String) method and then its getHostName() method).

This assumes that both your server and the client have access to the same
DNS entries (i.e. ip-addresses can be properly resolved to their
user-readable host-names).

-- Anton Spaans.
 
T

Tor Iver Wilhelmsen

JAVA Rookie said:
Hi, I am working on a intranet app, and when I re-direct user's
request to another local machine which has tomcat installed, how can
I avoid users can see http://192.168.x.x in their url? And how can I
put, for example, like http://local-apps.com instead.

Something (Tomcat) needs to pass a Location: HTTP header in the
response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top