1 Reply Latest reply on Jul 31, 2008 4:27 PM by Francisco Jose Peredo Noguez

    Cookbook for seamgen and tomcat without embedded-jboss?

    Steve Tynor Newbie

      • Seam 2.0.3.CR1

      • Tomcat 6



      We are about to embark on our second Seam project, and for this one we have a requirement to deploy to a simple servlet container (Tomcat) without embedded-jboss (our project does not use EJB).


      We've been completely unsuccessful in adapting a simple seamgen generated WAR project to run on Tomcat6. Of course, we've been able to deploy the simple jpa example without problem, but that project looks nothing like a seamgen'd one, so it's hard to know where to begin in what to change in our seamgen'd app to make it work on raw Tomcat.


      Can someone point me at a cookbook of what to do?  I've read the reference manual, and seen previous comments on the forum that it's just a matter of adjusting the jars included in the war, editing a configuration option here or there (persistence.xml, components.xml, etc.), but it would be very helpful if someone who has been through the pain could list specifically what they did to create a deployable app.   This seems to be a common question, but I've been unable to find a straightforward answer.


      Thanks!


        • 1. Re: Cookbook for seamgen and tomcat without embedded-jboss?
          Francisco Jose Peredo Noguez Master

          It is pretty simple, just create your project with JBossTools 2.1.2 as always, configure it for tomcat instead of JBoss, and then keep throwing in jar libraries from jboss-seam-2.0.2.SP1\lib to you project WEB-INF\lib until you satisfy all the ClassNotFoundExceptions.


          A good example is in jboss-seam-2.0.2.SP1\examples\jpa\. (You coul also run the ant with the command: ant tomcat6 and take a look at the contents of the generated WEB-INF/lib.


          Oh, and remember to configure you DataSources in the context.xml file instead of the -ds.xml file.