aspose file tools*
The moose likes Tomcat and the fly likes avoid port number :8080 in URL ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "avoid port number :8080 in URL ?" Watch "avoid port number :8080 in URL ?" New topic
Author

avoid port number :8080 in URL ?

varun bihani
Ranch Hand

Joined: Aug 11, 2003
Posts: 96
Can anybody help me with the solution to avoid :8080 (tomcat port number) in the URL for applications that is being developed in servlets/jsp/hibernate ?

I know there is connector mod_jk that ppl use to integrate apache and tomcat, but that is much big problem for me becoz:
I have more than 40 other jsp sites that have been running for last 8 yrs with the port number in URL.. if I integrate , means I have to make changes in all of them

Any help would b appreciatable.

Varun


<a href="http://www.galaxyweblinks.com" target="_blank" rel="nofollow">www.galaxyweblinks.com</a><br /><a href="http://www.freechatcode.com" target="_blank" rel="nofollow">www.freechatcode.com</a><br /><a href="http://www.onlinefamilytreemaker.com" target="_blank" rel="nofollow">www.onlinefamilytreemaker.com</a>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

"ppl" and "becoz" are not words. Please use real words when posting.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
varun bihani
Ranch Hand

Joined: Aug 11, 2003
Posts: 96
I am so sorry..
ppl = people
becoz= because.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

No need to apologize. The guideline is to benefit you. Please read this for more information.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by varun bihani:
Can anybody help me with the solution to avoid :8080 (tomcat port number) in the URL for applications that is being developed in servlets/jsp/hibernate ?


The only way to do is to configure the listener / connector to the default port 80, in that case you can avoide writing the port number in the URL.

Now about the other applications that are running in the same server.

I do not know whether its possible or not. You can configure multiple listeners for the server / tomcat.Let the one which is there to be like that and configure one more listner (a cyote listner) for you particular web application.If this is permitted , then your problem is solved.


Rahul Bhattacharjee
LinkedIn - Blog
varun bihani
Ranch Hand

Joined: Aug 11, 2003
Posts: 96
Originally posted by Rahul Bhattacharjee:


The only way to do is to configure the listener / connector to the default port 80, in that case you can avoide writing the port number in the URL.


Now about the other applications that are running in the same server.

I do not know whether its possible or not. You can configure multiple listeners for the server / tomcat.Let the one which is there to be like that and configure one more listner (a cyote listner) for you particular web application.If this is permitted , then your problem is solved.


THAT MEANS, I NEED TO USE SOME CONNECTOR LIKE mod_jK ??
how can I find out if its possible to configure 2 listners ?what is cyote listner ?
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by varun bihani:


THAT MEANS, I NEED TO USE SOME CONNECTOR LIKE mod_jK ??
how can I find out if its possible to configure 2 listners ?what is cyote listner ?


mod_jk is for connecting apache's web server to tomcat.
Look at the tomcat docs for installing a new listner for your purpose.
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
<Connector port="80"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />


My blood is tested +ve for Java.
varun bihani
Ranch Hand

Joined: Aug 11, 2003
Posts: 96
but if I do this, you sure, other requests to port 80 like apache will be fine. like php, cgi ??
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Varun, you are right. If will effect your existing setup. Sorry I miss understood your requirments.
varun bihani
Ranch Hand

Joined: Aug 11, 2003
Posts: 96
So, it is ok..
I assume, I should use connectors or listeners as Rahul suggested.. ?
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by Chetan Parekh:
Varun, you are right. If will effect your existing setup. Sorry I miss understood your requirments.


Can we not configure two listners? One for the existing application , which may continue to listen to port 8080 and the new one for this application which wants to route requests through 80.
If two connectors can be configured then its done.I guess now it becomes a question eligible for Tomcat forum.
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
You can only have only a single process serving on any one port.
If you try to have 2 Tomcats running on port 80, the second will fail to start.


42
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
No , we want to have two listners operating on two different ports.
One the default at 8080 and one more we want to add for port 80 , in the same tomcat.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If something else, Apache HTTPD for instance, is already bound to port 80, then Tomcat will need to use a different port.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Moved from servlets to Apache/Tomcat
Rashid Mayes
Ranch Hand

Joined: Jan 11, 2006
Posts: 160
Is there another process using port 80?

Are you running you Tomcat as Root?

Do you have the port number hardcoded within the application?

For our deployments, we are running Tomcat under a limited account that does not have permission to bind to port 80 or modify any one else's files for that matter.

We then use iptables to forward Port 80 traffic to 8080. If you do not have a process running or port 80 you could use port forwarding to forward all the traffic on 80 to 8080. I use iptables, but ssh should work also.

You may have more options if you have multiple interfaces on the box.


Rashid Mayes
http://www.hostj2me.com/ - http://www.worlddeveloper.org/
Manu Dhanda
Greenhorn

Joined: Jan 28, 2006
Posts: 23
But as Varun said,

but if I do this, you sure, other requests to port 80 like apache will be fine. like php, cgi ??


So, the other option I could see is to use the connecters like mod_jk utilizing the functionality of Apache as well. :thumb:


"Books are as useful to a stupid person <br />As a mirror is useful to a blind person." <br /> <br />Chanakya quotes (Indian politician, strategist and writer, 350 BC-275BC)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: avoid port number :8080 in URL ?