I guess you should have a ContextLoaderListener setup in your WEB-INF/web.xml 
file.

It it's the case, then you should add the following context parameter in your 
web.xml

<context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                classpath*:META-INF/applicationContext.xml
                /WEB-INF/applicationContext.xml</param-value>
        </context-param>

providing your library applicationContext is named applicationContext.xml and 
is located in the META-INF directory embedded in the JAR file.

This configuration will tell Spring to parse both the jar included 
applicationContext.xml and the applicationContext.xml file located in you web 
application WEB-INF directory.

Hope it helps.

--ERic


On Tuesday 25 April 2006 09:48, Stephane Decleire wrote:
> You've understood my configuration.
> I've tried to rename the applicationContext file with no results.
> It looks like this file is never parsed ...
>
> Mark wrote:
> > I'm not sure if I understand this... Do you have your library as a jar
> > file (your-lib.jar) and in there an applicationContext.xml?
> > And then another applicationContext.xml in your webapp classpath?
> > If so, then I guess your xml file in the jar gets overwritten by the
> > one in the webapp.
> > I guess you should name the one in the library jar differently, e.g.
> > "my-lib-applicationContext.xml" so you will not run into conflicts
> > like this one...
> >
> > MARK
> >
> > Stephane Decleire wrote:
> >> Hi,
> >>
> >> I have a library wich used Spring to link Tapestry component to
> >> Hibernate backend.
> >> When I use this library in my application which also use Spring, my
> >> application applicationContext file is used by the library instead of
> >> its applicationContext ...
> >> Any idea ???
> >>
> >> Thanks in advance.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Eric Fesler
Technical Director
-------------------------------------------------------------------
 Audaxis S.A.
 Tel: +32 (0)2 361.83.01 
 Fax: +32 (0)2 361.83.11 
 Mob: +32 (0)478 22.90.78 
 http://www.audaxis.com
 
 PGP Fingerprint : FECF 2841 48B7 47D8 C426 55A4 0A60 FB52 833B 1EF1
 Public PGP key  : available at server subkeys.pgp.net
-------------------------------------------------------------------

You have a strong desire for a home and your family interests come first.

Attachment: pgpQobbG1fd6D.pgp
Description: PGP signature

Reply via email to