Announcement Announcement Module
Collapse
No announcement yet.
cannot access a bean defined in dispatcher Servlet's xml Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • cannot access a bean defined in dispatcher Servlet's xml

    We have a spring bean defined in one of our dispatcher Servlet's xml (i.e., dg-servlet.xml).

    <bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freema rker.FreeMarkerConfigurer">
    ...
    </bean>

    We would like to access it from application context. But it cannot be found either by referring it in the application-context.xml or programmaticlly.

    How do we solve this problem?

    Thank a lot!

  • #2
    You're doing it wrong. Inject the bean wherever you need it.

    Comment

    Working...
    X