Announcement Announcement Module
Collapse
No announcement yet.
in jsp, how to use bean defined in applicationContext.xml Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • in jsp, how to use bean defined in applicationContext.xml

    Say I have test bean defined in <bean id="test" class="Test"/> in applicationContext.xml. Now I'd like to access this bean in my jsp. Somehow <jsp:useBean id="test" class="Test" scope="application"/> creates new instance of Test, not using the singleton Bean test created by Spring.

    How to achieve this goal?

    thanks!

  • #2
    Chapter 13 in the Spring reference manual discusses JSP and JSTL integration in some detail, plus you can find some great examples of Spring and JSP usage in the sample applications that are included with the distribution. They explain this better than I can here

    Post back if you have no luck.


    Rob

    Comment

    Working...
    X