• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

controller not getting call on start up

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic