Example jdbc entity for MySQL

This assumes of course that you have the MySQL drivers installed and available in your WEB-INF/lib directory for Expresso or otherwise available in your CLASSPATH.

The login and passwords are just examples.

Change 'localhost' to the correct host name or IP if the database is not running locally.

Change 'dbname' to the name of the database that you have created for this Expresso context.

        
	<jdbc 
		driver="org.gjt.mm.mysql.Driver" 
		url="jdbc:mysql://localhost/dbname" 
		connectFormat="1"
		login="user"
		password="userspassword"
		cache="true"
		limitationPosition="LIMITATION_AFTER_ORDER_BY" 
		limitationSyntax="LIMIT %offset% , %maxrecords%" 
		createTableIndicies="true"
		hasBooleanType="false"
		skipText="true"/>
	<type-mapping>
		<java-type>LONGVARCHAR</java-type>
		<expresso-type>text</expresso-type>
		<db-type>text</db-type>
	</type-mapping>
	<type-mapping>
		<java-type>BIT</java-type>
		<db-type>CHAR</db-type>
	</type-mapping>
	<type-mapping>
		<java-type>REAL</java-type>
		<db-type>DECIMAL</db-type>
	</type-mapping>
	<type-mapping>
		<java-type>BINARY</java-type>
		<db-type>LONGBLOB</db-type>
	</type-mapping>
	<type-mapping>
		<java-type>VARCHAR</java-type>
		<db-type>varchar</db-type>
	</type-mapping>
	<type-mapping>
 		<java-type>CLOB</java-type>
		<db-type>TEXT</db-type>
	</type-mapping>
<images>%context%/%expresso-dir%/images</images> <startJobHandler>n</startJobHandler> <showStackTrace>y</showStackTrace> <mailDebug>n</mailDebug>

Last Modified: 16 Sept, 2004