I use connection pooling with Tomcat 5.5.4. Entry in server.xml looks like this:
<Context path="/myApp" docBase="myApp" debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="user" password="java" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/instrukcije?autoReconnect=true" />
</Context>
Everything works fine, just I don't know how to specify which character set is to be used for retrieving data from database (I'm getting some strange symbols when I try to retrieve text data containing some central-european characters).
When connecting to database from application without connection poll, character set can be specified in database url somehow like this:
url = jdbc:mysql://localhost:3306/instrukcije?username=user&password=java&useUnicode=true&characterEncoding=charset
But that won't work in case of connection pooling mentioned above.
How to do the similar thing in case of connection pooling mentioned above?
I'm using Connector/J JDBC driver for MySQL.
Thanks in advance.
tvrdi
<Context path="/myApp" docBase="myApp" debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="user" password="java" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/instrukcije?autoReconnect=true" />
</Context>
Everything works fine, just I don't know how to specify which character set is to be used for retrieving data from database (I'm getting some strange symbols when I try to retrieve text data containing some central-european characters).
When connecting to database from application without connection poll, character set can be specified in database url somehow like this:
url = jdbc:mysql://localhost:3306/instrukcije?username=user&password=java&useUnicode=true&characterEncoding=charset
But that won't work in case of connection pooling mentioned above.
How to do the similar thing in case of connection pooling mentioned above?
I'm using Connector/J JDBC driver for MySQL.
Thanks in advance.
tvrdi