Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [Wtp-wst-dev] eclipse WTP WST automatic rebuild project context xml file resource param

Hi,

In the future, please ask questions like this on the WTP newsgroup.

The short answer is to place the contents you show below in a "WebContent/META-INF/context.xml" file in your project.  The context child elements will appear in the server.xml used by the running Tomcat.  Note that this is not the server.xml you find under the Servers project.  For more details, post a question on the WTP newsgroup.  Thanks.

Larry


-----Original Message-----
From: wtp-wst-dev-bounces@xxxxxxxxxxx [mailto:wtp-wst-dev-bounces@xxxxxxxxxxx] On Behalf Of Jose Alfaro
Sent: Tuesday, July 19, 2005 12:20 PM
To: wtp-wst-dev@xxxxxxxxxxx
Subject: [Wtp-wst-dev] eclipse WTP WST automatic rebuild project context xml file resource param

Hi, I am new in WST.

I used to use the myproject.xml file to create a javax.sql.Datasource Resource. This was created in jakarta-tomcat-5.0.28/conf/Catalina/localhost/myproject.xml :

<?xml version='1.0' encoding='utf-8'?>
<Context path="/myproject" reloadable="true" docBase="Work spaces/Default/myproject/web" workDir="Workspaces/Default/ myproject/work" >
        <Logger className="org.apache.catalina.logger.SystemOutLogger" 
verbosity
="4" timestamp="true"/>
  <Resource name="jdbc/myproject" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/myproject">
    <parameter>
      <name>validationQuery</name>
      <value>SELECT CURRENT_TIMESTAMP;</value>
    </parameter>
    <parameter>
      <name>maxWait</name>
      <value>15000</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>20</value>
    </parameter>
    <parameter>
      <name>driverClassName</name>
      <value>org.postgresql.Driver</value>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>2</value>
    </parameter>
  </ResourceParams>
</Context>

But, now Eclipse rebuild this file automaticly everytime i restart tomcat, without th <Resource> definition.

There is another way to create the <Resource> or no build the myproject.xml file ?

Thanks,

--
Jose-Andres Alfaro


_______________________________________________
wtp-wst-dev mailing list
wtp-wst-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-wst-dev


Back to the top