tomcat DB access with port forwarding

From: sime (sime--.._at_--..anticd.org)
Date: 05/25/04


Date: Tue, 25 May 2004 11:18:00 +1000

I wrote a simple java app to test SSH port forwarding to a DB that
doesn't allow direct access, and it works. When I use the same code for
a servlet, tomcat isnt happy about it...

ssh -L 2020:db.server.com:1521 public.server.com -C

thus
dbDriverName = "oracle.jdbc.driver.OracleDriver";
dbURL = "jdbc:oracle:thin:@localhost:2020:db_name";

works for the simple app, but not with tomcat.

-sime