aspose file tools*
The moose likes Spring and the fly likes controller not getting call on start up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "controller not getting call on start up" Watch "controller not getting call on start up" New topic
Author

controller not getting call on start up

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
Hi,

I have written a sample EAR project, the EAR file consists of EJB3 and Spring 3.0.6 in the WAR module.
Deployment gone through successfully, but the controller is not getting call.

Here is my mvc-dispatcher-servlet.xml file:



web.xml file:


controller class:



Log message from deployment:


war file:



Any suggestion would be very appreciated.
Thanks
Sam
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

This is confusing me. Looks like you have two different things mixed up.



The context param is for the ContextLoaderListener creating an ApplicationContext for just the middle tier beans. The mvc-dispatcher-servlet.xml is following the naming convention of the file that the DispatcherServlet looks for to create the other ApplicationContext that is just for the web layer beans.

In a Spring MVC app you should have 2 ApplicationContexts. One for middle tier beans using ContextLoaderLister and one for the web layer beans using DispatcherServlet. To tell the DispatcherServlet where its config file is, you use the init-param tag in the <servlet> tag in your web.xml

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: controller not getting call on start up