File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes how to remove the port number..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how to remove the port number....." Watch "how to remove the port number....." New topic
Author

how to remove the port number.....

Yegappan Balasubramanian
Greenhorn

Joined: Nov 19, 2001
Posts: 13
Hi all,
I am using Tomcat 4.0 server to run my JSP application.When i tried to run the application,i have to give the URL like this
http://www.mysite.com:8080/myfolder/myfile.jsp
but actually i want the URL to be given like this
http://www.mysite.com/myfolder/myfile.jsp
Also i dont want to give that http in the URL.
I would like to give the URL like this
www.mysite.com/myfolder/myfile.jsp
Any solution for the above???
Thanks
Yeg
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

That kind of question is more likely to get a fast answer in the Apache/Tomcat forum. However, in answer to your questions:
"http:" is required to tell the server what protocol you will be using. Other common ones are "https:" (secure http) and "ftp:" (file transfer protocol). However, most web browsers will automatically assume/negotiate, so the user typing in a URL can skip that part. It IS however, good practice to include it in hyperlinks and other stuff you send out, as a matter of clarity and to avoid inexplicable errors if the assumption process goes wrong.
Browsers also assume they will be talking to the user's TCP/IP port 80 when using the "http:" protocol. In Tomcat's server.xml file you'll find a way to specify port 80 instead of 8080. 8080 is a popular port for "testing" servers and such, as is 8008.
So actually, if I type in "www.javaranch.com" to by browser's navbar, what is REALLY being processed is "http://www.javaranch.com:80/"


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to remove the port number.....
 
Similar Threads
Probelm with creating virtual hosting with tomcat
how to remove the port number in URL
Changing Host Name
Custom URL alias in Tomcat 4.0.1
Search Engine Submitting Problem