File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Setting default port Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Setting default port" Watch "Setting default port" New topic

Setting default port

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
Currently I have installed the Tomcat server in my PC. After I start the server, I need to type http://localhost:8080/index.jsp in my browser to see the page.

Could there be any setting where in I type just http://localhost then it redirects to my index page where i do not need to specify the port address

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You can set this in TOMCAT_HOME/conf/server.xml

Just search for "8080" and you'll find the section

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
I believe you can change the port number in TOMCAT's server.xml. Where exactly in the server.xml, I am not sure. Just be carefull modifying the server.xml.

Just look for "8080" and change it to "80"
It is sorta covered in the JavaRanch Style Guide.
subject: Setting default port
Similar Threads
running Apache and Tomcat together
Is it possible, More than one tomcat running in the one system?
httpd.conf question
Running JBuilder8 with Jakarta Tomcat: can't view the Tomcat Admin application
Deploy war files in Apache