Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using JSP&Servlets with Spring

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
My application uses Spring and plain servlets and JSP as a presentation layer.
In the application there is on object that uses a HibernateDao in order to access the database.
How can get an instance of that object that I have configured in Spring context file ?
(In a similar way of using factory.getBean( ))
Should I create a resolver such the following when I'm using JSP an Servlets ?
What does a resolver do ?

Thanks for help.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add the following to your web.xml



And then do the following when needing an instance of your wired bean...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic