Creating a new JNDI data source resource  server.xml

Chapter 1: Developer Features

web.xml

Here is the entry in web.xml for the portal database:

<resource-ref>
    <description>PortalDatabase</description>
    <res-ref-name>jdbc/portaldb</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

There are several instances of web.xml in the EP installation. The initial instance is located in x:\infoedition\tomcat\conf (where x is the drive on which EP is installed) as part of the original EP installation. Each subsequent instance of web.xml is created and configured when a Web application is deployed; for example, when Web Studio is deployed, x:\infoedition\tomcat\webapps\onepage\WEB-INF\web.xml is created and configured. Each deployed Web application has its own web.xml file in that application’s associated WEB-INF directory.

NoteAll configured web.xml entries and resources are placed in the java:comp/env portion of the JNDI namespace.

StepsCreating a new entry in web.xml

  1. Open web.xml in a text editor. This file is located in x:\infoedition\tomcat\webapps\onepage\WEB-INF on Windows, where “x” is the drive where EP is installed.

  2. Create a new <resource-ref> section. You may want to copy and paste another <resource-ref> section and type over the existing entries with the new information.

  3. Save the file and close the text editor.

  4. Restart the database server and the application server.





Copyright © 2004. Sybase Inc. All rights reserved. server.xml

View this book as PDF