Discussions

General J2EE: Jbuilder Configuration for Tomcat 5.0

  1. Jbuilder Configuration for Tomcat 5.0 (2 messages)

    I am new to Jbuilder....
    Hey can anyboby help me in how to configure tomcat for accessing database using datasource...
    I mean how to set all the parameters...
    Is there any wizard for it or we have to do it in the old way by editing the server.xml....
    Pl help me with this....
  2. Configure JBuilder to recognize Tomcat 5.
    Enterprise->Configure servers

    If you want to run your web project (using dataSources) with JBuilder ... define the dataSource in a file called
    jb-{nameOfYourWebContext}.xml (It's in Tomcat folder of your project .. generated by Jbuilder ).. define the dataSource as it was the server.xml of your Tomcat.

    Now you can run/debug .. and the datasource will be found.
    Hope to be helpful 4U :)
  3. JBuilder 2005 and DBCP[ Go to top ]

    Configure JBuilder to recognize Tomcat 5.Enterprise->Configure serversIf you want to run your web project (using dataSources) with JBuilder ... define the dataSource in a file calledjb-{nameOfYourWebContext}.xml (It's in Tomcat folder of your project .. generated by Jbuilder ).. define the dataSource as it was the server.xml of your Tomcat.Now you can run/debug .. and the datasource will be found.Hope to be helpful 4U :)

    I 've wrote the following in the jb-{nameofYourWebContext}.xml

    and is still not working

    <Resource name="jdbc/TestDBCPDS" auth="Container" type="org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS"/>
    <ResourceParams name="jdbc/TestDBCPDS">
      <parameter><name>factory</name><value>org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS</value></parameter>
      <parameter><name>user</name><value>htspy</value></parameter>
      <parameter><name>password</name><value>htspy</value></parameter>
      <parameter><name>driver</name><value>org.postgresql.Driver</value></parameter>
      <parameter><name>url</name><value>jdbc:postgresql://localhost/htspy:5432</value></parameter>
    </ResourceParams>

    <Resource auth="Container" name="jdbc/TestDB" type="org.apache.commons.dbcp.datasources.PerUserPoolDataSource"/>
    <ResourceParams name="jdbc/TestDB">
      <parameter><name>factory</name><value>org.apache.commons.dbcp.datasources.PerUserPoolDataSourceFactory</value></parameter>
      <parameter><name>defaultMaxActive</name><value>10</value></parameter>
      <parameter><name>defaultMaxIdle</name><value>2</value></parameter>
      <parameter><name>defaultMaxWait</name><value>-1</value></parameter>
      <parameter><name>dataSourceName</name><value>java:comp/env/jdbc/TestDBCPDS</value></parameter>
    </ResourceParams>

    Do you have any clues why?