What protocol is used for communication between App server and DB server in Java EE if they are both hosted on different machines?
I mean if I use JDBC, then can I just specify IP of DB server in the config file(connection string)
and the connection will be established?
And if it does get established then what protocol is used to communicate across the two servers?
Is this protocol database dependent?
Or should I have web services on the DB server to communicate with the App server?
The protocol to communicate with the DB is database dependant. The JDBC driver takes care of communicating with the DB for you.
The URL of the database is also database dependant, and contains the information necessary for the driver to connect to the database server.
Using web services on the DB server is definitely a bad idea:
Read the JDBC tutorial for more information.