See http://www.openntf.org/internal/home.nsf/response.xsp?action=openDocument&documentId=7888655D70FDDD6186257930002E1D3F&MainID=D861DE698262EDDA86257930002AEE52 for an example how to connect to MS SQL. It might give you some ideas, since JDBC is more or less the same for any RDBMS. See specifically point 1. It's not enough to put the .jar to plugins folder. It needs to be as plugin.
See http://www-10.lotus.com/ldd/ddwiki.nsf/dx/creating_an_xpages_library for instructions how to create a plugin.
Update
I did try it from scratch with H2 database engine. Following works:
1) I imported JDBC driver to WebContent/WEB-INF/lib
2) I did create WebContent/WEB-INF/jdbc/h2.jdbc with following content
<jdbc>
<driver>org.h2.Driver</driver>
<url>jdbc:h2:tcp://localhost/~/test</url>
<user>SA</user>
<password></password>
</jdbc>
3) Create a simple Xpage with following content. I marked with bold part where connection defined in (2) is specified.
<xp:viewPanel rows="10" id="viewPanel1" var="user">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager1">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xe:jdbcQuery connectionName="h2" sqlQuery="select * from test"
var="jdbcData1" defaultOrderBy="id">
</xe:jdbcQuery>
</xp:this.data>
<xp:viewColumn id="viewColumn1" columnName="id">
<xp:this.facets>
<xp:viewColumnHeader xp:key="header" id="viewColumnHeader1"
value="ID" sortable="true">
</xp:viewColumnHeader>
</xp:this.facets>
</xp:viewColumn>
<xp:viewColumn id="viewColumn2" columnName="name">
<xp:this.facets>
<xp:viewColumnHeader xp:key="header" id="viewColumnHeader2"
value="NAME" sortable="true">
</xp:viewColumnHeader>
</xp:this.facets>
</xp:viewColumn>
</xp:viewPanel>
Will try reproduce it later in Oracle 11g Express Edition.
UPDATE #2
For Oracle 11 XE Release 2 it works exactly the same, with only one exception. I had to follow http://www-01.ibm.com/support/docview.wss?uid=swg21279509 to grant following rights:
grant {
permission java.lang.RuntimePermission "getClassLoader";
}
In addition, I used ojdbc6.jar as advised in Oracle documentation, due to fact that Domino 8.5.3 uses Java 6. Of course, my initial statement with adding Oracle JDBC driver to Domino in form of a plugin, since this will allow you to use it in every XPages application.