This content has been marked as final.
Show 3 replies
-
1. Re: Context management for custom servlets
pmuir Oct 14, 2007 2:46 PM (in response to thatrichard)"thatrichard" wrote:
I'm using Seam-2.0.0.Beta1. According to the docs:25.1.4.6. Context management for custom servlets
...Seam provides a servlet filter that can be applied to any other servlet that needs access to Seam components.
This filter allows custom servlets to interact with the Seam contexts. It sets up the Seam contexts at the beginning of each request, and tears them down at the end of the request
I'm reading this as saying that I can configure Seam to inject components into a simple on-JSF servlet.
No, it just sets up the context - no injection is available - you'll have to get Seam components programatically e.g. using Component.getInstance() or Logging.getLog() -
2. Re: Context management for custom servlets
paulconnor Feb 6, 2008 11:41 AM (in response to thatrichard)Not sure how realistic this suggestion is... is it possible for a future release to support injection in a custom servlet? If so, are there any plans to support add that capability?
-
3. Re: Context management for custom servlets
christian.bauer Feb 6, 2008 11:51 AM (in response to thatrichard)Why would Seam support that? With lookup through Component.getInstance(), I can easily unit test methods of my servlet, even without running the servlet in an actual servlet container, just instantiating it in a SeamTest. If I'd use injection, I'd have to run a servlet container that has the special injection magic.