my dog learned polymorphism
The moose likes Tomcat and the fly likes Changing Host Name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Changing Host Name" Watch "Changing Host Name" New topic

Changing Host Name

Nitin Menon
Ranch Hand

Joined: Jun 13, 2007
Posts: 87
I have an issue regarding the host name. i saw a previous post regarding the same topic. My problem is slightly different.
by editing the host file, i could change
http://localhost:8080/PTS/JSP/myfile.jsp to
Is it possible to change the host name to
that is, i would like to hide the port number and file location too.

Thanks in advance,
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403

Yes, you can change the entry in windows host file...

It will contain an entry somewhat like localhost

you can change it to


Ujjwal B Soni

<baroda, gujarat, india>


Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

The short answer is: No, you can not change the host fil, and get the URL you here want.

BUT - you can set up your Application Server, so you will get the wanted URL.
[ January 02, 2009: Message edited by: Rene Larsen ]

Regards, Rene Larsen
Dropbox Invite
I agree. Here's the link:
subject: Changing Host Name
It's not a secret anymore!