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 Francisco Exposito Aguilera <fc...@hotmail.com> on 2007/09/12 15:30:27 UTC
properties file location
Hello,
As I´ve read, there are two options to tell iBatis where is the properties resource file:
<properties resource="ads/orquestador/entrada/tabla/ibatis/SqlMapConfig.properties"/>
<properties url="file:///C:/Archivos de programa/CoCreate/Shared/Model Manager 2006/ads/conf/SqlMapConfigEntrada.properties" />
Is there any way to tell iBatis a relative path where the file is located? Because I will have a jar file and I need to put the SqlMapConfig.properties outside the jar and the folder depends.
Sometimes the jar will go to
C:/Archivos de programa/CoCreate/Shared/Model Manager 2006/ads/conf/
and sometines in
C:/Archivos de programa/CoCreate/Shared/Model Manager 2007/ads/conf/
and I don´t want to change properties resource every time I create the jar file.
If I try to put
<properties resource="../../../../../../ads/conf/SqlMapConfig.properties"/>
when I execute it I receive an IOException with no file found message.
Thanks a lot.
_________________________________________________________________
Llama a tus amigos de PC a PC: ¡Es GRATIS!
http://get.live.com/messenger/overview
Re: properties file location
Posted by Larry Meadors <lm...@apache.org>.
I don't think so - URLs are absolute, and resources must be on the classpath.
Larry
On 9/12/07, Francisco Exposito Aguilera <fc...@hotmail.com> wrote:
>
> Hello,
>
> As I´ve read, there are two options to tell iBatis where is the properties
> resource file:
>
>
>
> <properties
> resource="ads/orquestador/entrada/tabla/ibatis/SqlMapConfig.properties"/>
>
>
>
> <properties url="file:///C:/Archivos de programa/CoCreate/Shared/Model
> Manager 2006/ads/conf/SqlMapConfigEntrada.properties" />
> Is there any way to tell iBatis a relative path where the file is located?
> Because I will have a jar file and I need to put the SqlMapConfig.properties
> outside the jar and the folder depends.
>
> Sometimes the jar will go to
> C:/Archivos de programa/CoCreate/Shared/Model Manager 2006/ads/conf/
> and sometines in
> C:/Archivos de programa/CoCreate/Shared/Model Manager 2007/ads/conf/
>
> and I don´t want to change properties resource every time I create the jar
> file.
>
> If I try to put
> <properties
> resource="../../../../../../ads/conf/SqlMapConfig.properties"/>
>
> when I execute it I receive an IOException with no file found message.
>
> Thanks a lot.
>
> ________________________________
> Llama a tus amigos de PC a PC: ¡Es GRATIS! Pruébalo