On 26.2.2011 18:50, ahmet temiz wrote:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/usr/local/workspace1/pro1" docBase="pro1"
        crossContext="true" reloadable="true" debug="1">
        <Resource name="jdbc/bzk2" auth="Container" type="javax.sql.DataSource"
                driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://127.0.0.1:5432/bzk2"
                username="orkun" password="222222" maxActive="20" maxIdle="10"
poolPreparedStatements="true"
                maxWait="-1" accessToUnderlyingConnectionAllowed="true" />
</Context>

1. Remove the path attribute. Docs: "The value of this field must not be set except when statically defining a Context in server.xml, as it will be inferred from the filenames used for either the .xml context file or the docBase."

2. Remove the docBase attribute. Docs: "The value of this field must not be set when the Context is configured using a META-INF/context.xml file as it will be inferred by the automatic deployment process."

3. Remove the reloadable attribute. Docs: "This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand."

4. Remove debug attribute. Docs: "". It is deprecated.

5. If "222222" is actual password, change it. I advise you to remove passwords from the examples you post, since you make them visible to the world-wide audince.

Also, if your DB parameters at development and production are different (which is recommended), you will need two context.xml files, and a proper script to pack the right one into the WAR archive.

-Ognjen


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to