Is there a way to use a Seam Logger inside of a standard Java Servlet? I have one servlet that I use to serve up content, while the rest of my application is developed using Seam. I’d like to be able to make use of Seam’s built-in Log functionality in my servlet, the same way I do with the rest of my Seam-based classes. In my Servlet constructor, I tried calling
Log logger = (Log)Component.getInstance(Log.class);
…but I’m getting an exception. Is there a better way to “inject” a Logger into the servlet? Something I’m missing? Thanks!!
I didn’t tested it, but you could try this :
That’s what i use in my tests.