Announcement Announcement Module
No announcement yet.
Passing the active ContextLoader to a bean Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • hardiman
    started a topic Passing the active ContextLoader to a bean

    Passing the active ContextLoader to a bean

    How would one access the ContextLoader in the applicationContext.xml file that that the ContextLoader is processing? Ultimately I would like to pass it to a bean. e.g.
    <bean id='myBean' class=''>
    <property name='context' ref='this'/>

    where 'this' is the ContextLoader processing applicationContext.xml file.

    Appreciate any assist.

  • hardiman
    This may not be the club solution, but it at least works.
    I created a bean that implements ResourceLoaderAware and put it at the top of the applicationContext.xml file. The beans sole responsibility is to park the resource loader into a JVM Singleton so that other classes can later acquire resources relative to /WEB-INF.

    Leave a comment: