File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Web application start up (With spring) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Web application start up (With spring)" Watch "Web application start up (With spring)" New topic
Author

Web application start up (With spring)

Laxmikant Kumbhare
Ranch Hand

Joined: Sep 19, 2011
Posts: 38

Hello there,

I want a method (or some functionality) to be executed after my web application starts (context loaded). I am using spring 3.0 as framework.

I tried using ServletContextListener which I implemented in my class


my listener class




and part of web.xml is




but its not printing that message.....


Please help me....
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17234
    
    1

Spring has such a listener class already called ContextLoaderListener. Try using that. You also might have to set a <context-param> to point to your config files, unless you use the naming convention of applicationContext.xml and put that in the WEB-INF directory.

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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Web application start up (With spring)
 
Similar Threads
not able to get the context attribute set in ServletContextListener
JSF 1.2 + Authentication with Spring Security 3.0.5
NullPointerExeption when connecting to MS SQL
Spring annotation no handler found
When HttpSessionAttributeListener and HttpSessionBindingListener methods are called?