Hi, I'm extremely new to Curl and I'm trying to write a database driven application but I'm having trouble setting it up.
I've been following "The Basic Database Server" from here: http://developers.curl.com/userdocs/docs/en/dguide/data-connection.html
So far I have SQLServer set up as my database management system and I've downloaded Tomcat as my java servlet engine. I downloaded the Microsoft SQLServer JDBC driver into the Tomcat dir as instructed. The CDBC .war file is also in the specified dir. Both the server.xml file and cdbc-server.xml have been modified word for word except for the user/pass.
For server.xml, three environment elements are added. With MS Sql Server, would something like this be correct?
"The first configuration parameter is cdbc/database. The value should be "mysql" or "oracle" depending on what database you are using with the CDBC servlet. It is used to select the Resource that will be used to configure the JDBC driver, either "cdbc-mysql" or "cdbc-oracle". You can use other values if you wish, provided you also supply a corresponding Resource element in the server.xml file and a ResourceLink element in the cdbc-server.xml file (see below). If unspecified, the default value is "mysql" and the resource "cdbc-mysql" is used to configure the JDBC driver."
<!-- CDBC configuration -->
<Environment name="cdbc/database"
type="java.lang.String"
value="sqlServer"
/>
<Environment name="cdbc/transaction-control"
type="java.lang.String"
value="mysql"
/>
<Environment name="cdbc/table-type"
type="java.lang.String"
value="TABLE,VIEW,SYNONYM"
/>
<Resource name="cdbc-sqlServer"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
driverClassName="org.gjt.mm.mysql.Driver"
url="jdbc:mysql://localhost/cdbc_test?useUnicode=true&characterEncoding=utf-8"
username="myUserName"
password="myPassWord"
maxActive="20"
maxIdle="10"
/>
There are obviously more things to change. But which ones? And to what? What would I modify in the cdbc-server.xml file?
<Context path="/cdbc-server" reloadable="false">
<Logger className="org.apache.catalina.logger.SystemOutLogger"
verbosity="4" timestamp="true"/>
<ResourceLink name="cdbc/transaction-control"
global="cdbc/transaction-control"
type="java.lang.String" />
<ResourceLink name="cdbc/table-type" global="cdbc/table-type"
type="java.lang.String" />
<ResourceLink name="jdbc/cdbc" global="cdbc-mysql"
type="javax.sql.DataSource" />
<ResourceLink name="jdbc/cdbc-mysql" global="cdbc-mysql"
type="javax.sql.DataSource" />
<ResourceLink name="jdbc/cdbc-oracle" global="cdbc-oracle"
type="javax.sql.DataSource" />
<ResourceLink name="cdbc/default-schema/oracle/en"
global="cdbc/default-schema/oracle/en"
type="java.lang.String" />
<ResourceLink name="cdbc/default-schema/oracle/ja"
global="cdbc/default-schema/oracle/ja"
type="java.lang.String" />
</Context>
Sorry for all the questions but it seems like a lot of the examples are very mySQL specific and not enough explanation is given for other database management systems. I'm a total newb. Also, any advice on what else I should do is helpful. Thanks.