-
Feb 12th, 2007, 01:25 AM
#1
configure applicationContext for servlets?
hi..
i would like to configure tomcat servlet with applicationContext, i don't want to use webflow, or mvc, i just wanna wire beans simplest (and fastest way), i thought about using ClassPathApplicationContext, but i was wondering if i can use the WebApplicationContext for this as well.
(using spring 1.2.8).
-
Feb 12th, 2007, 01:43 AM
#2
Just use the ContextLoaderListener to load the ApplicationContext. It will be registered in the ServletContext under a specified name (WebApplicationContext.ROOT_WEB_APPLICATION_CONTEX T_ATTRIBUTE) for the actual value check the source of the ContextLoaderListener and related classes.
Of course you can always create your own loader which uses the ClassPathXmlApplicationContext.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules