file open help
Vic Cekvenich <[email protected]> Fri, 18 Apr 2003 20:50:29 -0400
| Newsgroups | gmane.comp.java.mvc.devel |
|---|---|
| Organization | baseBeans Engineering |
| Message-ID | <[email protected]> |
I can't think of a nice solution to open file. I wonder if somone else
might be able to think of something of the top.
I have beans using db layers. I want to use them in both struts and a
console app (no container).
To get console to work I open config like this:
File f = new File ("properties\\sql-map-config.xml");
_sqlMap = XmlSqlMapBuilder.buildSqlMap(f);
To get struts to work I open config file like this:
Reader reader = Resources.getResourceAsReader(
"properties/sql-map-config.xml");
_sqlMap = XmlSqlMapBuilder.buildSqlMap(reader);
Of course I would like to be able to get to it from console app and
struts/web app without some if/than thing. I looked at DB layer resource
file.
Suggestion?
It's late and... I can't think. But what ever I think of will be in my
best practices.
tia,
.V