File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Query regarding loading  the application.xml file inside servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Query regarding loading  the application.xml file inside servlet" Watch "Query regarding loading  the application.xml file inside servlet" New topic
Author

Query regarding loading the application.xml file inside servlet

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
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

Joined: Jan 10, 2002
Posts: 60766
    
  65

Please be sure to ask Spring questions in the Frameworks forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query regarding loading the application.xml file inside servlet
 
Similar Threads
Deployment Exception
Does <listener> element cannot be before <context-param>
how to initiate hashtable and linklist
Spring with Hibernate Integration
What is the purpose of the ContextLoaderListener