Java and Tomcat: Why do I need the port number when accessing Tomcat?

My ultimate goal is to setup a website that displays data from a database. I will use Java, Apache, Oracle, and whatever else I need to create a website the uses servlets, JavaServer Pages, and JDBC.
I�ve got four Pentium III computers:
1. Windows 2000 Server to be the web server (MyWebServer, IP = 10.10.1.1).
2. Windows 2000 Professional to be the database server (MyDatabaseServer, IP = 10.10.1.2).
3. Windows 2000 Professional that I use to develop and test (MyDeveloperPC, IP = 10.10.1.3).
4. Windows 2000 Professional that I use as a client to connect to the website (MyClientPC, IP = 10.10.1.4).
I installed Java Web Services Developer Pack on MyWebServer. It requires Java 2 Standard Edition (J2SE), so I installed that first. The files I downloaded and installed are as follows:
J2SE: j2sdk-1_4_0-rc-win.exe
JWSDP: jwsdp-1_0-ea1-win.exe
After installing these products, I set the environment variables as follows:
JAVA_HOME = c:\j2se
JWSDP_HOME = c:\jwsdp
Path = c:\j2se\bin;c:\jwsdp\bin; [and other previous statements]
On MyWebServer I start Tomcat (from the JWSDP menu option). It starts properly (as far as I can tell).
Then, from MyClientPC I open Internet Explorer and in the address box I type:
http://10.10.1.1
�The page cannot be displayed�.
I then try again and add the port number:
http://10.10.1.1:8080
This displays the page c:\jwsdp\webapps\root\index.html.
Here�s my question: Why do I have to enter the port number to get a page displayed? Do I have to have Apache HTTP Server running on MyWebServer to display pages without entering the port number?
Thanks for your help.

When you web server is running at the default Http Port, then you do not have to specify the port yourself.(The browser does it automatically)
So if you run your web server at port 80, then you will not have to specify the port explicitlyin the url.
If you want to use tomcat only as a jsp/servlet processing engine then install a web server (either IIS, or apache web server) and run it on port 80. (so that you dont have to specify the port)
Now configure tomcat to run as a servlet engine for this web server. for this refer to the tomcat documentation.
If you do not want to have an external webserver then you can configure tomcat itself to run at port 80 (in this case tomcat would do the work of both the web server as well as jsp/servlet engine... but this is not the setup for a production site). this can be done by changing the server.xml file in the conf directory of tomcat installation.
hope this helps.
regards,
Abhishek.

Similar Messages

  • Problem with serial read and write-unab​le to refresh the port number

    I use the advanced serail write and read example. Build the application, copy the application to another laptop with labview run time engine 2009 installed. And I connect my serial device via a serial to usb adaptor. The problem is that VISA source number is always com1, even I refresh it. But in my case the device via adpator should be com5. I can get the hyperterminal working using com5. Something must be wrong. The strange thing is that there are three laptops, I did the same processdure with each one, one of them are working, the other two won't. Anybody came cross same problems before? Many thanks.

    Hi,
    I think you didn't have installed the Visa Run time engine on this computer.
    best regards,
    V-F

  • Tomcat Server Port Number: Why do I have to enter the port number?

    My ultimate goal is to setup a website that displays data from a database. I will use Java, Apache, Oracle, and whatever else I need to create a website the uses servlets, JavaServer Pages, and JDBC.
    I�ve got four Pentium III computers:
    1. Windows 2000 Server to be the web server (MyWebServer, IP = 10.10.1.1).
    2. Windows 2000 Professional to be the database server (MyDatabaseServer, IP = 10.10.1.2).
    3. Windows 2000 Professional that I use to develop and test (MyDeveloperPC, IP = 10.10.1.3).
    4. Windows 2000 Professional that I use as a client to connect to the website (MyClientPC, IP = 10.10.1.4).
    I installed Java Web Services Developer Pack on MyWebServer. It requires Java 2 Standard Edition (J2SE), so I installed that first. The files I downloaded and installed are as follows:
    J2SE: j2sdk-1_4_0-rc-win.exe
    JWSDP: jwsdp-1_0-ea1-win.exe
    After installing these products, I set the environment variables as follows:
    JAVA_HOME = c:\j2se
    JWSDP_HOME = c:\jwsdp
    Path = c:\j2se\bin;c:\jwsdp\bin; [and other previous statements]
    On MyWebServer I start Tomcat (from the JWSDP menu option). It starts properly (as far as I can tell).
    Then, from MyClientPC I open Internet Explorer and in the address box I type:
    http://10.10.1.1
    �The page cannot be displayed�.
    I then try again and add the port number:
    http://10.10.1.1:8080
    This displays the page c:\jwsdp\webapps\root\index.html.
    Here�s my question: Why do I have to enter the port number to get a page displayed? Do I have to have Apache HTTP Server running on MyWebServer to display pages without entering the port number?
    Thanks for your help.

    Oh simmy1, so silly....
    You have to enter the port number because Tomcat is running on that port (probably 8080). You actually don't NEED apache at all. Most people use it an HTTP listener because historically, servlet engines and application servers had shitty listeners. (WebLogic 5.1 was really bad.) Not sure how they stack up today.
    Port 80 is the default port that browsers will look at. (Try it, hit these forums with http://forum.java.sun.com and then hit it with http://forum.java.sun.com:80. See? Same thing.) If you don't want to have to enter a port number, just make sure whatever is running at the front of your network is serving on port 80. It doesn't matter if its apache, tomcat, weblogic, iis or whatever. There is nothing wrong with running Tomcat on port 80, although using a webserver proxy like apache is generally recommended.
    And don't listen to simmy1, this is his second bonehead post I've seen today: http://forum.java.sun.com/thread.jsp?forum=45&thread=231154

  • Why do I need the link spfileDBNAME.ora to +DATA/DBNAME/PARAMETER/spfile..

    Hi
    One month before I stated the question
    >
    Why do I need the an alias  spfileDBNAME.ora to *ASM-File +DATA/DBNAME/PARAMETER/spfile..*
    >
    in a RAC-Environment.
    Levi Pereira gave me kindly the answer in the Thread:
    Re: RAC Backup + Restore & Recover
    But I can find now this answer in this Thread!
    Can Levi or somebody else give me the answer again?
    Thank in advance
    hqt200475
    Edited by: hqt200475 on Mar 7, 2011 5:41 AM

    http://download.oracle.com/docs/cd/E11882_01/rac.112/e16795/admin.htm#CHDHFIGC says:
    >
    Oracle recommends that you do not use the default SPFILE names because all instances must use the same file and they all have different SIDs. Instead, store the SPFILE on Oracle ASM. If you store the SPFILE on a cluster file system, then use the following naming convention for the SPFILE: $ORACLE_HOME/dbs/spfiledb_unique_name.ora. Create a PFILE named $ORACLE_HOME/dbs/initsid.ora that contains the name SPFILE=ORACLE_HOME/dbs/spfiledb_unique_name.ora.

  • Why do we need the @EJB annotation at the class level?

    Why do we need the @EJB annotation at the class level?
    Eg: Why do we need the first piece of code, when the second code seems much simpler .
    *1.*
    @Stateful
    @EJB(name="ejb/TradeLocalNm",
    beanInterface=TradeLocal.class)
    public class TradeClientBean implements TradeClientRemote {
    *2.*
    @Stateful
    public class TradeClientBean implements TradeClientRemote {
    @EJB private TradeLocal trd;
    }

    I think it is possible to do it in an aggregated level however you need to define your distribution rules in order to get the desired result, you need also to consider that if distribution rules changes and the value after promotional planning returns the same value, it is possible that detailed level are not realigned to the new distribution rule (e.g. regarding another ratio).
    Maybe this is one of several causes.
    Regards,
    Carlos

  • Why do I get the following message when I open an APP. Connect to ITUNES to use push notifications. What do I need to do to resolve this issue.

    Why do I get the following message when I open an APP. Connect to ITUNES to use push notifications. What do I need to do to resolve this issue.

    I have had the same problem since the iOS 7 update, but with regards to the Find Friends app. uninstalling and reinstalling the app has not fixed the problem

  • My MacBook Pro was stolen last night. I need the serial number. It is not showing up on my devices list. My iPads and iPhones are. I have used it to to sync my phones and pads as well having it registered with apple. Any thoughts? Thanks

    My MacBook Pro was stolen last night. I need the serial number. It is not showing up on my devices list. My iPads and iPhones are. I have used it to to sync my phones and pads as well having it registered with apple. Any thoughts? Thanks

    Click here: https://supportprofile.apple.com/MySupportProfile.do
    SIgn in with your Apple ID, the same one you used to access this support forum.
    Hopefully, you will see a list of all the devices you registered with your Apple ID, including their serial numbers. Let me know how this works out.
    Edit to add: If you enabled "find my imac" on your Pro, you ought to be able to remotely lock it, or even wipe its memory. Click http://www.icloud.com/ sign in with your Apple ID and click the big green "find my iPhone" icon (nevermind the name, it will find all your devices provided they're running Lion or iOS 5).
    Then file a police report and nail the b*****d.

  • I lost my Iphone 4s and I need the iMei number to trace. THAT fellow actually off my phone at my last location.I dont have sim on that i phone.I am trying to trace the iphone through find my phone but it showing offline. Thus another way of solving w

    I lost my Iphone 4s and I need the iMei number to trace. THAT fellow actually off my phone at my last location.I dont have sim on that i phone.I am trying to trace the iphone through find my phone but it showing offline. Thus another way of solving will be through IMEI number which i need to hand it over to the police! How can i get the iMei number? Can I use Itune? As previously, I did sync into iTunes before. Will it have the record of my iMEI number? PLEASE HELP ME!
    iPhone 4S, iOS 7.0.1

    how to find IMEI, etc
    http://support.apple.com/kb/HT4061?viewlocale=en_US&locale=en_US

  • Why do i get the following message when i attempt to open my backup file for lightroom cc?  "Lightroom cannot use the catalog named "Lightroom Catalog" because it is not writable and cannot be opened".  This message just started coming  up after downloadi

    why do i get the following message when i attempt to open my backup file for lightroom cc?  "Lightroom cannot use the catalog named "Lightroom Catalog" because it is not writable and cannot be opened".  This message just started coming  up after downloading lightroom cc (previously using lightroom 5)...am i backing up properly or not???

    Open Pictures folder and move the files named lrcat-journal and lrcat.lock to Desktop.
    Make sure that , they are not inside Pictures folder any more and try to open backup from Lighrtroom and check..
    Any LRcat file with .lock extension , move it to Desktop.

  • HT5824 My iPad has been stolen. I need the serial number to report it to the authorities. I dont have the box it came in or the receipt and its not on my itunes on the computer because I didnt use it or music, just pictures. Can someone please help???

    My iPad has been stolen. Someone broke into my house on Tuesday. I have already tried locking it through icloud.  I have reported this to the authorities but they cannot do much unless I give them the serial number to the iPad. With the serial number they can put it into a database and send that inormation to pawn shops, so i the theie tries to pawn it, the pawn shop employeee can convscate the iPad and hand it over to the authorites. I need the serial number to report it to the authorities. I dont have the box it came in or the receipt and its not on my itunes on the computer because I didnt use it or music, just pictures. Can someone please help??? btw, some words are misspelled becasue the letter that comes ater the letter E, doesnt work on my keybord.
    Thanks

    Serial Number
    http://support.apple.com/kb/HT4061
    Sign in to My Support Profile
    https://supportprofile.apple.com/

  • I lost my ipad and i need the serial number and IMEI , please help me how?

    i lost my ipad and i need the serial number and IMEI , please help me how?

    If you have registered your device, you can go to https://supportprofile.apple.com/ and log into your apple id.  Your devices appear there with serial numbers.
    Additionally, your serial number is included on the original receipt when purchased at any Apple Online or Apple Retail store, or any Authorized Apple Reseller.

  • My ipod touch was stolen and I need the serial number for the police report how can i recover it

    my ipod touch was stolen and i need the serial number for the police report how can i get that

    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • My ipod touch was stolen and i need the serial number but i dont have the paper work on it or the box so how do i get it

    my ipod touch was stolen and i need the serial number but i dont have the paper work or the box, so how do i get the serial number?

    If you registered it, Apple can help you.  Give them a call.
    Change your iTunes (Apple ID) password along with any other password that was stored in the iPod.  If any passwords are associated with credit cards, contact the CC company and get your card replaced (with a new number).  If any passwords are associated with your bank or any savings institution, contact them also and discuss approprate action with them.
    The "Find my..." function is pretty much useless if the device is in the hands of a thief.  All that is necessary is for the thief to connect to any computer with iTunes and "Restore as new."
    The only real protection you have is with the personal information on the device rather than the physical device itself.  Something as small as an iPod should have a strong 8-digit (or longer) password AND be configured for automatic wipe in the event of ten consecutive incorrect password entries.

  • My Ipod was stolen and I need the serial number how can I get it

    My Ipod was stolen and I need the serial number. How can I get this?

    Finding serial number for a device - https://discussions.apple.com/message/18246553 - from box or backup file, not from Apple.
    http://support.apple.com/kb/HT2526 - You can use My Support Profile to find a list of serial numbers that have been purchased or registered with your Apple ID.
    My Support Profile - https://supportprofile.apple.com/MySupportProfile.do

  • I lost my phone, I don't have internet on my phone and I need the serial number to track it

    I lost my phone, I don't have internet on my phone and I need the serial number to track it.. I just have my number and the company service.. Is it possible to know it with my apple ID?

    From Reporting a lost or stolen Apple product:
    ...  Although Apple does not have a process to track or flag lost or stolen product, you can use My Support Profile to find a list of serial numbers for items purchased or registered with your Apple ID.
    Try that too.

Maybe you are looking for