This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 79
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> <+919909981973>
"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
Don't get me started about those stupid light bulbs.
subject: Changing Host Name
Similar Threads
Tomcat problem
Use welcome-file-list to run struts action?
session vulnerable pages
how to remove the port number in URL
how to remove the port number.....