As explained in a previous lesson, WebSphere® Application Server uses database connection information in the EAR project. Tomcat uses database connection information in the web project. Thus, the database connection steps differ for each server.
EGLDerbyDB
workspace-location/EGLWeb/WebContent/EGLDerbyDB
workspace-location is the full path to your current workspace. Click OK.


Note that EGL has given this connection a JNDI name, which is an identifier for the connection. By default, the JNDI name is jdbc/EGLDerbyDB, based on the name of the database. The application will use this name to access the database connection at run time.

jdbc:derby:D:\MyData\workspace_jsf_tutorial\EGLWeb\WebContent\EGLDerbyDB
jdbc/EGLDerbyDB

If you are using Tomcat, your project doesn't have an EAR project, so EGL added a contexts file to the web project that gives the information for the connection. The contexts file performs essentially the same task as the information in the deployment descriptors: it associates the JNDI name with the location of the database and other information that the server needs to connect to it. The connection is valid only for this project.