tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Connection between TOMCAT and DB2 ???
Date Thu, 01 Aug 2002 13:30:59 GMT

Correct me if I am undertanding it correctly.
If the DB2 server is running on (default port 50000) cline tmachine
then in my client application, I need not specify the port number.

But I may or maynot use the port number (50000) in my Connection URL
Now When I use
 String url = "jdbc:db2://"; /** with port number ,
it doesnot work ***/

 String url = "jdbc:db2://"; /** without it works ***/

There are two things that are bugging me:

1. Why specifying portnumber doesnot work (though I understand it is not

2. In my earlier experience, I need to specify the port number that is not
50000 but some other number...Is it because it is not the default port
that I need to specify it in my Connection string.

Please reply me if you think I have a point...

Nishant Awasthi
Corporate Systems Development
Progressive Insurance

                    Ryszard Lach                                                         
                    <>          To:     Tomcat Users List                 
                    08/01/2002           cc:     (bcc: Nishant Awasthi)                  
                    04:47 AM             Subject:     Re: Connection between TOMCAT and  
                    Please               DB2 ???                                         
                    respond to                                                           
                    "Tomcat Users                                                        

On Wed, Jul 31, 2002 at 03:11:03PM -0400,
> Thanks Richard for your help,
> Yes, just now I managed to connect DB2 to Tomcat and using simple java
> able to retrieve the values from sample database.
> But I have a question for you.
> while defining my Connection URL I never specified a port number.
>   String url = "jdbc:db2://";
> If you see above I just gave IP address of my machine and not port
> In past cases I have used port number given to me by the DBA.
> I would like to know what is the importance of port number and which
> service is running on this port.

DB2 usually listens on 50000 port (the server). You use it in 'catalog
tcpip node' command on client, then you execute 'catalog node ...' on the client machine and then use the new
database name and ip of the client machine. You don't need the port
number, DB2 client knows it.


"First they ignore you. Then they laugh at you. Then they
fight you. Then you win." - Mohandas Gandhi.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message