Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuse
AppFuse_jp
AppFuse_zh
Articles
CreateAnAJAXBasedFil...
Downloads
LeftMenu
Main




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseQuickStart


This is version 82. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]


AppFuse's main purpose is to help you quickly accelerate the start of your webapp. Here are the basic steps to creating a new project with it.
  1. Download the source version or checkout the appfuse module from CVS (cvs -d :pserver:[email protected]:/cvs co appfuse).
  2. Install J2SE 1.4+, set a JAVA_HOME environment variable, install Ant 1.6.2+, set an ANT_HOME environment variable.
  3. Install MySQL 3.23.x+ (recommend 4.0.18) and Tomcat 4.1.x+ (recommend 5.0.28). Set a CATALINA_HOME environment variable to point to your Tomcat installation. Optionally, you can see my development environment setup and get links to download the above packages.
  4. Setup a local SMTP server or change mail.properties (in the web/WEB-INF/classes directory) and build.properties (in the root -- for log4j messages) to point to an existing one - they default to localhost.
  5. Copy lib/junit3.8.1/junit.jar to $ANT_HOME/lib.
  6. Run ant new -Dapp.name=YOURAPPNAME -Ddb.name=YOURDBNAME. This will create a directory named YOURAPPNAME in the same directory as appfuse.
    WARNING: Some app.name values will not work - don't use "test", anything with "appfuse" in it or anything that starts with numbers.
  7. Navigate to the new directory and run ant setup to create the database and setup your app on Tomcat. The database setup will only work if your root user has no password. You can change this in build.properties if necessary. If you want to test and make sure everything works, run ant test-all - make sure Tomcat is stopped when you do this.
  8. Run ant test-reports - there will be a message after it runs telling you how you can view the generated reports.

After you've confirmed your installation using the above steps - take a look at the Tutorials to see how to develop with AppFuse.

Optional Installations

  • If you'd like to use iBATIS as a persistence framework option, view the README.txt in extras/ibatis.
  • If you'd like to use Spring as the web framework, view the README.txt in extras/spring.
  • If you'd like to use WebWork as the web framework, view the README.txt in extras/webwork.
  • If you don't want to install iBATIS, Spring MVC or WebWork - you should delete their installers in the extras folder before checking your project into source control.

NOTE: These installers will modify the Eclipse classpath, but not the IDEA one. You'll need to modify that manually.


Usually, after you get all this to work - it's likely you'll want to change all your package names to "com.company" rather than "org.appfuse". I use Eclipse to rename packages. To do this, go to the package view, click on a package name and right click -> Refactor -> Rename. Type in "*.xml,*.properties,*.xdt" for File name patterns to search in.

NOTE: If you want to use iBATIS, I recommend you install it (instructions at extras/ibatis/README.txt) before renaming all the packages. If you don't install it first, you can add the ibatis/src as a source directory and rename packages there. Make sure to edit/change all the package names in the .xml files (including build.xml). You will also need to manually change the package names in the *DAOiBatis files.

By adding "*.xml,*.properties,*.xdt" to the File name patterns field in the Rename Package wizard, the following files should be changed as well. If you're not using Eclipse or something isn't working right - you might want to ensure the "org.appfuse" has been changed to "com.company" in the following files:

- metadata/web/global-exceptions.xml
- web/WEB-INF/tiles-config.xml
- web/WEB-INF/classes/log4j.properties
- web/WEB-INF/validator-rules-custom.xml
- src/service/com/company/service/applicationContext-service.xml
- src/dao/com/company/dao/hibernate/applicationContext-hibernate.xml
- metadata/templates/struts_form.xdt

You'll need to manually change the location of the Hibernate mapping files in the applicationContext-hibernate.xml file (location listed above). Basically, "org/appfuse" needs to be changed to "com/company".

You'll also need to change a few targets in build.xml to refer to the new package names. These targets/changes are listed below:

- junitdoclet-module - change org.* to com.*
- javadoc - change org.* to com.*

If you rename the org.appfuse.webapp.form package to, say test.web.form, you also have to edit the ConverterUtil in the src/service package. Method getOpposingObject is your friend, take a look at


name = StringUtils.replace(name, "model""webapp.form");
name = StringUtils.replace(name, "webapp.form""model");



Go to top   More info...   Attach file...
This particular version was published on 06-Nov-2006 13:52:24 MST by MattRaible.