Here's another example of what to put in WEB-INF/web.xml

        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
                        classpath:applicationContext.xml
                        classpath:applicationContext-acegi-security.xml
                </param-value>
        </context-param>

Then put your appContext.xml in the classpath obviously.  I usually put mine
in the root source folder with no problems.



Ned Collyer wrote:
> 
> What I've done is as follows
> 
> In WEB-INF/web.xml i have the following  listeners and params.
> 
>     <context-param>
>         <param-name>contextConfigLocation</param-name>
>         <param-value>${myConfigDir}/applicationContext.xml</param-value>
>     </context-param>
>     <listener>
>         <description>Configures Log4J for this web app.</description>
>        
> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
>     </listener>
>     <listener>
>         <description>Configures spring with this web app.</description>
>        
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>     </listener>
> 
> This means that via a property I can tell the app to keep the
> applicationContext.xml anywhere. (eg,
> JETTY_OPTS="-DmyConfigDir=file:/someDirectory")
> 
> If you use this it should ... hopefully work for you.  I cant remember the
> setup in too much detail, but it works :)
> 
> * Please note, this is to do with spring and the context file location,
> nothing to do with hibernate mappings not finding classes - so sorry if it
> doesn't cover that :)
> 
> 
> freak182 wrote:
>> 
>> My question is, the appContext.xml should be put in the classpath or
>> /WEB-INF/config ?is there is difference between the two? Any idea.
>> Thanks a lot.
>> Cheers
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/annotated-class-tp15476390p15480763.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to