Problems about connection to a database
I've imported a dynamic projects which connects to an old Cloudscape v5.1 database. It works fine, that means the different .jsp pages connect to the database and can work with it.
Now, I want to set up a new dynamic web project and work with the same database. I'm trying to set up a connection (through a datasource), but I always get an error!
Here's the code:
javax.naming.InitialContext ctx = new javax.naming.InitialContext();
ds = (javax.sql.DataSource)ctx.lookup("java:comp/env/" + datasourceRef);
con = ds.getConnection();
and the error I get:
Connection exception: Name "comp/env/ClipsAndTacks" not found in context "java:".
Exception thrown: null
I have to admit, that I don't understand anything from the first two rows of the code.
Can someone help/explain me?
I would really appreciate every answer!
Thanks a lot!