-
Nov 1st, 2010, 01:14 AM
#1
Spring with Tomcat
Hi
I have a 3-tier appln hosted in Tomcat; web, service and DAO layers.
How do you integrate Tomcat and Spring? I need to make use of Spring's dependency injection, transaction management, etc.
I can only think of instantiating a ClassPathXmlApplicationContext but this way the ApplicationContext singleton instance is not visible across layers.
Thanks in advance.
Best Regards
Will
-
Nov 1st, 2010, 06:13 AM
#2
I'm not sure you're asking the right question. You shouldn't need to integrate Spring and Tomcat directly. Tomcat is merely the servlet container in which you deploy your app, be it a Spring app or not.
If you're trying to create a web app with Spring, the Spring DispatcherServlet will pass requests off to handlers and controllers in the Spring container, so you wouldn't need to instantiate an application context yourself.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules