tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat: JNDI and Google Webtoolkit
Date Thu, 26 Jun 2008 13:25:48 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

nabruphonic,

nabruphonic wrote:
| I moved the driver to the common-directory. Unfortunately it still
does not
| work. In my Java-Code, do I have to write only the following code to
connect
| with the connection pool?
| Code:
|
| InitialContext ctx = new InitialContext();
| DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/eco_test");
|
| cn = ds.getConnection();

Can you tell us what error you actually get? So far, you have just said
that it "doesn't work".

Also, you probably want the <Resource> to be in an app-specific
context.xml (that is, <WEBAPP>/META-INF/context.xml) instead of the
global context.xml in $CATALINA_HOME/conf/context.xml.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhjmNwACgkQ9CaO5/Lv0PArGQCfYZ6t1FS+CknxlVxZxxvLeeYt
IgwAoIUK5XejJHR/um+K5pioa4b0WbC1
=7e9p
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message