• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query regarding loading the application.xml file inside servlet

 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have mentioned the





Are these above two steps are sufficient .

OR

Do i still need to use WebApplicationContext to load the XML files ??
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Spring questions in the Frameworks forum. I have moved this post there for you.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those first two just puts an ApplicationContext object, with your created beans, into the WebContext.

If you want access to it directly in a Servlet class, then you shoudl use the WebContextUtils class to get the reference to the ApplicationContext to lookup your Beans.

If you are using say Struts or Spring MVC, then there is classes already created that allow you to inject your beans into those classes. ActionSupport from Spring for Struts, and Controller classes for Spring MVC.

Mark
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic