[jboss-user] [JBoss Seam] - Seam Eclipse project structure (newbie question)

tptackab do-not-reply at jboss.com
Thu Jun 21 13:05:52 EDT 2007


I'm still rather new at Seam (and web development) and I'm finding it difficult to setup a Seam POJO project using a standard WTP JSF 1.2 (dynamic web) project. I understand the packaging structure defined in the Seam reference doc; however, I'm unsure as to how that would translate into my development project structure.

I'm using Eclipse 3.3 + WTP JSF 1.2. When I create a new project, Eclipse creates (and expects) a structure like this:

my-application/
  |     src/
  |         com.myapp.foo.java
  |         com.myapp.bar.java
  |         ...
  |     WebContent/
  |         index.html
  |         index.xhtml
  |         foopage.xhtml
  |         barpage.xhtml
  |         META-INF/
  |             MANIFEST.MF
  |         WEB-INF/
  |             faces-config.xml
  |             web.xml
  |             LIB/
  |                 el-api.jar
  |                 el-ri.jar
  |                 jsf-facelets.jar
  |                 ...  

The Seam reference document (J2EE/pojo) example shows the following packaging:

my-application.war/
  |     META-INF/
  |         MANIFEST.MF
  |     WEB-INF/
  |         web.xml
  |         components.xml
  |         faces-config.xml
  |         lib/
  |             jboss-seam.jar
  |             jboss-seam-ui.jar
  |             el-api.jar
  |             el-ri.jar
  |             jsf-facelets.jar
  |             hibernate3.jar
  |             hibernate-annotations.jar
  |             ...
  |             my-application.jar/
  |                 META-INF/
  |                    MANIFEST.MF
  |                 seam.properties
  |                 hibernate.cfg.xml
  |                 org/
  |                     jboss/
  |                         myapplication/
  |                             User.class
  |                             Login.class
  |                             Register.class
  |                             ...
  |     login.jsp
  |     register.jsp
  |     ...

The example above shows the project source JARd up with seam.properties and the hibernate config files. Is it necessary to create this JAR, i.e can those files "live" in src/, the web root, or WEB-INF during development? Can I deploy those files exploded somewhere else in the standard Eclipse-built war structure during development?

My best guess would be as follows:

my-application/
  |     src/
  |         com.myapp.foo.java
  |         com.myapp.bar.java
  |         ...
  |     WebContent/
  |         index.html
  |         index.xhtml
  |         foopage.xhtml
  |         barpage.xhtml
  |         META-INF/
  |             MANIFEST.MF
  |         WEB-INF/
  |             faces-config.xml
  |             web.xml
  |             components.xml
  |             seam.properties
  |             LIB/
  |                 jboss-seam.jar
  |                 jboss-seam-ui.jar
  |                 el-api.jar
  |                 el-ri.jar
  |                 jsf-facelets.jar
  |                 hibernate3.jar
  |                 hibernate-annotations.jar
  |                 ...  

I've not had any luck with the above structure so far, but that might be becuase of other configuration issues, missing libs, ingnorant newbie, etc. :-) 

Am I on the right track?

If you've accomplished this in Eclipse, I would very much appreciate an example.

Thanks!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056597#4056597

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056597



More information about the jboss-user mailing list