Announcement Announcement Module

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Accessing spring context from a servlet Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing spring context from a servlet

    I basically have a simple webapp, hello world servlet, in which I want to inject a service, without using spring-mvc. Is that possible?

    -- Thomas

  • #2
    This is not really a Spring DM question but rather a general container question. There are bridges between Servlets and the Spring container:
    Since servlets are managed by the web container, applying injection on them is tricky since the instance becomes managed by more then one entity (Spring + container).
    That's why in general, Servlets are used for routing requests (as a dispatcher) while the web framework takes care of creating and configuring the actual request endpoints.