Sep 2nd, 2011, 04:27 AM
access a spring bean from a servlet
Hi I am new in Spring please guide me,
I want to access spring bean(IOC) from simple servlet .
Following are the requirements
1. A spring bean (.xml file) which internally using hibernate to communicate with persistence layer
2. Want to access that bean from servlet extending HttpServlet
3. Configuration of web.xml
4. required jar files.
Please reply with a small example. Thanks in advance
Sep 2nd, 2011, 06:06 AM
The reference guide answers that... I suggest a read of that it explains how to use spring in such an environment... One hint WebApplicationContextUtils...
Sep 6th, 2011, 12:14 AM
Hi Marten Deinum,
Can you please give me a small code snipp. It will be helpful to me.
Sep 6th, 2011, 03:08 AM
As I stated that is all in the reference guide...
Sep 7th, 2011, 04:16 AM
Thank you very much . I could overcome the problem.
Thanks for your quick response.