2 Replies Latest reply on Sep 15, 2006 3:20 AM by vickyk

    How to use Microcontainer with tomcat (not jboss)

    lyo

      Hi friends:

      I want to use Microcontainer with tomcat server. But where should I place the jboss-beans.xml? I place it under dir " /WEB-INF/classes/META-INF",but I couldn't get my javabean in my class. Should I config it into web.xml? How to use the Microcontainer with web server. I mean that how to inject my bean into my servlet? Help!

        • 1. Re: How to use Microcontainer with tomcat (not jboss)
          vickyk

          I think what you can do is have the Servlet defined in the web.xml , this should be the startup servlet .
          In the init of the servlet you could then have the code which will read the jboss-beans.xml file as you do in the sample simple example ...
          Does this make sense , I have not tried this my self .

          Vicky

          • 2. Re: How to use Microcontainer with tomcat (not jboss)
            vickyk

            Oh what I can understand after rereading the post is that you are going to inject the properties in the Servlet .
            What you should do is have a set of dependent beans getting configured though the servlet and make them available though the session/page/application scope depending on your requirement. I think that is better approach.

            Regards
            Vicky