Orientation
This page describes the structure of JumpStart 7.0.n.
Web source is in these locations:
webBusiness source is in these locations:
|---src
|---main
|---java
|---jumpstart
|---web
|---components --> .java, .tml, .properties for components eg. Layout.java, Layout.tml
|---pages --> .java, .tml, .properties for pages eg. UserSearch.java, UserSearch.tml
|---services --> .java for services eg. AppModule.java and BusinessServicesLocator.java
|---WEB-INF --> app.properties file for web application-wide messages
businessEclipse compiles the java source to bin/, then runs our collapser to copy all the necessary items to collapsed/ . Its purpose is explained in Testing: WAR or EAR.
|---src
|---main
|---java --> messageDefs.properties file for business messages
|---jumpstart
|---business
|---domain --> .java for business domain (services and entities eg. SecurityFinderService and User)
|---resources --> .xml for persistence and datasource descriptors
The collapsed/ directory holds a WAR in "collapsed EAR" format:
collapsed
|---jumpstart.war --> the web layer with business layer embedded
|---WEB-INF
|---classes --> the business and web classes together
Reference These files describe the application structure. They rarely need to change.
enterprise/src/main/resources/META-INF/application.xml
is needed if we're deploying an EAR. It tells the application server that the EAR contains a WAR and a JAR,
and it says the WAR handles URLs involving jumpstart.
web/src/main/java/jumpstart/web/WEB-INF/web.xml
tells the web server how to handle jumpstart URLs - it says filter them through Tapestry!
business/src/main/resources/META-INF/MANIFEST.MF
tells the EJB3 server which classpath entries we need (in addition to the ones it provides).
business/src/main/resources/META-INF/persistence.xml tells the EJB3 server how we want to persist data - the datasource name and some settings. The collapser copies this file in from business/src/main/resources/persistence-descriptor where there is a choice of files to suit different combinations of HSQL, MySQL, H2, or Derby, with Hibernate, in OpenEJB, JBoss, or Glassfish. The collapser gets the one specified in build.properties.
business/src/main/resources/META-INF/persistence.xml tells the EJB3 server how we want to persist data - the datasource name and some settings. The collapser copies this file in from business/src/main/resources/persistence-descriptor where there is a choice of files to suit different combinations of HSQL, MySQL, H2, or Derby, with Hibernate, in OpenEJB, JBoss, or Glassfish. The collapser gets the one specified in build.properties.
The only one you're likely to change is persistence.xml. See Tips for more on that.
Tapestry expects a class called AppModule to exist to describe services we want added in:
Examples Here are the pieces involved in displaying a person (in example Total Control Output):
Layer | Source file | Location |
---|---|---|
View | TotalControlOutput.tml | web/src/main/java/jumpstart/web/pages/examples/output/ |
Controller | TotalControlOutput.java | web/src/main/java/jumpstart/web/pages/examples/output/ |
Web messages | app.properties | web/src/main/webapp/WEB-INF/ |
Services | IPersonFinderServiceLocal.java PersonFinderServiceLocal.java |
business/src/main/java/jumpstart/business/domain/person/iface/ business/src/main/java/jumpstart/business/domain/person/ |
Entity | Person.java | business/src/main/java/jumpstart/business/domain/person/ |
Business messages | messageDefs.properties | business/src/main/java/ |
Here are the pieces involved in editing a person (see example Total Control Edit). Many are the same as for displaying:
Layer | Source file | Location |
---|---|---|
View | TotalControlEdit1.tml | web/src/main/java/jumpstart/web/pages/examples/input/ |
Controller | TotalControlEdit1.java | web/src/main/java/jumpstart/web/pages/examples/input/ |
Web messages | app.properties | web/src/main/webapp/WEB-INF/ |
Services | IPersonFinderServiceLocal.java PersonFinderServiceLocal.java IPersonManagerSvcLocal.java PersonManagerSvc.java |
business/src/main/java/jumpstart/business/domain/person/iface/ business/src/java/main/jumpstart/business/domain/person/ business/src/java/main/jumpstart/business/domain/person/iface/ business/src/java/main/jumpstart/business/domain/person/ |
Entity | Person.java | business/src/main/java/jumpstart/business/domain/person/ |
Business messages | messageDefs.properties | business/src/main/java/ |
Tapestry locates components that aren't pages a little differently. For example, the "BoldItalicDisplay" component (see example Creating Components):
Layer | Source file | Location |
---|---|---|
View | BoldItalicDisplay.tml | web/src/main/java/jumpstart/web/components/examples/component/ |
Controller | BoldItalicDisplay.java | web/src/main/java/jumpstart/web/components/examples/component/ |