Yes, it can work, and you'd want to put the properties file in the WEB-INF/classes directory. Then your connectionfactory.jar classes will need to look for the property file/s on the classpath. Perhaps something like:
InputStream input = getContextClassLoader().getResourceAsStream(fileName); Properties props.load(input); > -----Original Message----- > From: Amrun [mailto:[EMAIL PROTECTED] > Sent: Monday, April 12, 2004 10:47 AM > To: [EMAIL PROTECTED] > Subject: use own property file for db-connection > > > Hi everyone, > > I'm working with Tomcat 5.0 and I'm trying to write a little > webapplication. In this case I need to get the data from a > database. Now I want to write my own property-file from which > I can get the information about the driver, user and > password. I've done this before, but I haven't done it on a > webserver so far. To get the Connection I'm using a > connectionfactory.jar file which reads the property file and > establishes a connection. > My question is now if this can work? And if yes where to do I > have to put the property file? > Maybe someone has done this before and can help me?! > Would be great, > > thx Amr�n > > -- > NEU : GMX Internet.FreeDSL > Ab sofort DSL-Tarif ohne Grundgeb�hr: http://www.gmx.net/info > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
