Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat configuration

 
sanchit chaudhary
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i change the host name to a userdefined name.
i am hosting a java application which i build using servlet and jsp.
i am using apache-tomcat-7.0.29 and jdk 7.
to acess my application i have to type HTTP:\\10.226.236.12:8080\\EmergencyImagePush\Firstpage.jsp.
Now what i want to do is that to acess the the same application by the name http:\\Image and it should give me the first page.
can you help.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't count on it. URLs use "real" slashes, not backslashes, so HTTP:\\10.226.236.12:8080\\EmergencyImagePush\Firstpage.jsp will only work on web clients that accept invalid URL syntax and compensate for it.

I get the impression that you don't understand what a URL really it (hint: it's not a filename path, and it's made of of several distinct components). It would be a good idea to learn about URLs and URIs, since the concept is central to the Internet - and not just for the World Wide Web part of it.

Having said that, a URL in the form of "http://image" (note the slashes!) only works if your hostname is "image". This is actually an incomplete URL and (again) you should expect that it won't work reliably except for web clients that compensate for its deficiencies.

So you need to learn about:

URLs and URIs
hostnames
domain names
well-known ports
domain name resolution and Domain Name Services (DNS)
Proxying and forwarding
Common client practices for resolving incomplete URLs

After that, then you'll be in a position to configure Tomcat properly.

 
sanchit chaudhary
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am hosting this application in an intranet for internal use only so i do not need a domain.
I am already hosting it from my local system and other people in the network can acess it but they have to type--
http://10.226.15.46:8080/EmergencyImagePush/FirstPage.jsp but i want the address to be http://Image or something short and hence it will be easy for the people in the network to acess it in one shot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic