eliminate "localhost:8080" to open tomcat server

Posted on 2006-06-02
Last Modified: 2013-11-24

I like to modify this link to open tomcat server "http://localhost:8080/.../..." to be like this "http:localhost" but i don´t know how, anybody can help me with this.

Wich xml do i have to modify or something like that?

Question by:tarkust
    LVL 11

    Accepted Solution

    You should change Tomcat's port address to 80 instead of 8080. This is controlled by the server.xml file in the Tomcat "conf" directory.

    Look for an entry similar to :

    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
              <Connector port="8080"
                         maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                         enableLookups="false" redirectPort="8443" acceptCount="100"
                         debug="0" connectionTimeout="20000"
                         disableUploadTimeout="true" />

    and change <Connector port="8080" to <Connector port="80"

    LVL 10

    Assisted Solution

    Easier way is to specify the port while installing tomcat.
    It will prompt for the port during the installation you can specify it as 80.

    LVL 29

    Assisted Solution

    There is one more method and it is the method used by many companies running serverside java components such as JSPs and Servlets, it's a little more complex but is the optimum solution.

    It is to install Apache Http Server on port 80 and use mod_jk 1.2 to connect Tomcat to Apache. This means that Apache serves the static content such as html and images while Tomcat serves the java components. This gives you a performance boost of about 20X for static content.
    LVL 30

    Assisted Solution

    Following the last approach, it basically means that the browser will still connect to port 80 on the server but all your HTML/ JSP requests will be served from there as required.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now