You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Jared Blitzstein <ma...@blitzstein.net> on 2007/04/04 21:41:47 UTC
Moving sqlmap files to /WEB-INF/sqlmaps/ instead of in the classpath
Is it possible to move the sqlmap xml files to a subdirectory in the /
WEB-INF/ of my web app? I'm trying not to mix xml files in my class
files and thought this might be a cleaner approach. Everything I've
found so far mentions about them being in the classpath. Thanks.
RE: Moving sqlmap files to /WEB-INF/sqlmaps/ instead of in the classpath
Posted by Daniel Pitts <Da...@cnet.com>.
On Wed, Apr 4 2007, Jared Blitzstein wrote:
> Is it possible to move the sqlmap xml files to a subdirectory
> in the / WEB-INF/ of my web app? I'm trying not to mix xml
> files in my class files and thought this might be a cleaner
> approach. Everything I've found so far mentions about them
> being in the classpath. Thanks.
>
Class path, despite its name, doesn't mean mixed with classes.
If WEB-INF is on your class path, then WEB-INF/sqlmaps/blah.xml is
accessible relative to the class path as "sqlmaps/blah.xml" I'm guessing
this trick works with iBATIS, but I'm not making any guaranty
RE: Moving sqlmap files to /WEB-INF/sqlmaps/ instead of in the classpath
Posted by Murtaza Goga <Mu...@trisyngroup.com>.
The sql map configuration is supports urls as well
<sqlMap url="..." />
You could also initialize com.ibatis.common.resources.Resources with a
custom implementation of a ClassLoader which does the external lookup.
-----Original Message-----
From: Jared Blitzstein [mailto:mailing-list@blitzstein.net]
Sent: Wednesday, April 04, 2007 3:42 PM
To: user-java@ibatis.apache.org
Subject: Moving sqlmap files to /WEB-INF/sqlmaps/ instead of in the
classpath
Is it possible to move the sqlmap xml files to a subdirectory in the /
WEB-INF/ of my web app? I'm trying not to mix xml files in my class
files and thought this might be a cleaner approach. Everything I've
found so far mentions about them being in the classpath. Thanks.