Webapp Creator

The webappCreator is a convenient tool that provides you with an Eclipse-based dynamic web application template project out of the box.

Project Structure

The structure of the web application template project looks like the following:
[WEBAPP HOME]
  |
  +--.settings    Eclipse project folder.
  |
  +-- lib         Folder to hold Java libraries used for during build, 
  |               but not deployment.  For example, jUnit's library.
  |
  +-- src         Folder to hold source code.
  |    |
  |    +-- java   Folder to hold Java source code.
  |    |
  |    +-- visio  Folder to hold Visio source file.
  |
  +-- test        Folder to hold test source code.
  |    |
  |    +-- java   Folder to hold Java test source code.
  |
  +-- web         Folder to be hold files to be deployed to servlet 
  |               container.  Includes configuration files, libraries,
  |               and java server pages.
  |
  +-- css         Folder to hold CSS style sheets
  |
  +-- img         Folder to hold Image files
  |
  +-- js          Folder to hold JavaScript files
  |
  +-- META-INF
  |     |
  |     +-- context.xml        Webapp context configuration file.  Can
  |                            be used to specify cross context setting
  |                            or JNDI resources from container.                    
  |
  +-- resources                Folders to hold additional JavaScript
  |                            libraries to be hosted within webapp.
  |                            For example, jQuery plug-in livequery.
  |
  +-- WEB-INF
  |      |
  |      +-- config
  |      |     |
  |      |     +-- applicationContext.xml  Main Spring configuration file
  |      |     |
  |      |     +-- log4j.xml               Log4J configuration file
  |      |     |
  |      |     +-- messages.properties     Messages for resource bundle.
  |      |     |                           For example, labels or error
  |      |     |                           messages.
  |      |     |
  |      |     +-- view.xml                Spring custom view definition
  |      |     |                           file.
  |      |     |
  |      |     +-- webapp.properties       Variables for web application.
  |      |                                 For example, version number.
  |      |
  |      +-- db
  |      |     |
  |      |     +-- dbproperties.xml        Contains JLink DB configurations.
  |      |
  |      +-- jsp
  |      |     |
  |      |     +-- include-crumbs.jsp      Breadcrumbs configuration.
  |      |     |
  |      |     +-- include-nav.jsp         Navigation menu configuration.
  |      |
  |      +-- lib                   Folder to hold Java libraries to be 
  |      |                         hosted within webapp. 
  |      |
  |      +-- decorators.xml        Sitemesh configuration file.  Specifies
  |      |                         which url pattern gets which decorator.
  |      |
  |      +-- web.xml               Main servlet configuration file.
  |
  +-- .classpath              Eclipse configuration file.
  |
  +-- .project                Eclipse configuration file.
  |
  +-- build-common.xml        Common Ant build file.
  |
  +-- build.properties        Ant build properties file.  Contains webapp
  |                           specific variables.
  |
  +-- itag-build.properties   Build properties for ITAG deployment process
  |
  +-- itag-build.xml          Ant build file for ITAG deployment process
  |
  +-- build.xml               Main Ant build file.

Java Package

You are advised to follow package organization to take advantage of Spring's IoC container and conform to other projects.

java
  |
  +-- edu.ucsd.act.sample.dao             Data Access Object Interface
  |
  +-- edu.ucsd.act.sample.dao.impl        Data Access Object Implementation
  |
  +-- edu.ucsd.act.sample.domain          Webapp domain objects
  |
  +-- edu.ucsd.act.sample.manager         Manager Interface
  |
  +-- edu.ucsd.act.sample.manager.impl    Manager Implementation
  |
  +-- edu.ucsd.act.sample.web             Controller
  |
  +-- edu.ucsd.act.sample.web.form        Form-backing (AKA command) objects
  |
  +-- edu.ucsd.act.sample.web.validator   Controller Validator

Ant Targets

The project includes Ant build files with the following common targets:

clean
Clean project
build
Compiles project java source files
war
Builds a web archive (war) file for deployement

Execute ant -p for more information.

Getting Started