Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 31 Next »

This page is a growing list of frequently asked questions about AppFuse.

Table of Contents

What is AppFuse?

AppFuse is an open source project and application that uses open source tools built on the Java platform to help you develop Web applications quickly and efficiently. It was originally developed to eliminate the ramp-up time found when building new web applications for customers. At its core, AppFuse is a project skeleton, similar to the one that's created by your IDE when you click through a wizard to create a new web project.

AppFuse 1.x uses Ant to create your project, as well as build/test/deploy it. AppFuse 2.x uses Maven 2 to create your project as well as build/test/deploy it. IDE support is much better in 2.x because you can generate the IDE project files with Maven plugins. AppFuse 1.x uses XDoclet and JDK 1.4+. AppFuse 2.x uses annotations and JDK 5+.

What are AppFuse's conventions for package naming?

It's recommended you start with com.companyname if you're commercial or org.organizationname if you're non-profit. Most folks match their internet domain name. From there, use your application name.

From there, AppFuse expects you to use the following conventions: -> Entities -> Dao Interfaces -> Hibernate Implementations -> Service Interfaces -> Service implementation -> Struts Actions (this really depends on the framework you're using)

What is the difference between AppFuse 1.x and 2.x?

AppFuse 2.0 works rather differently from AppFuse 1.x - Maven keeps the AppFuse core classes as dependencies. You add your code, and Maven will merge in the code from AppFuse. This should make it much easier for you to upgrade to future releases of AppFuse.

If you run mvn jetty:run-war and point your browser to http://localhost:8080/ you will see that you have a fully fledged AppFuse project present. If you need to change any of the files in the web project, simply run mvn war:inplace in the web project to populate the src/main/webapp source directory. You will need to delete WEB-INF/lib and WEB-INF/classes/struts.xml (if you're using Struts) after doing this.

Where are the Java source files and JSPs in 2.x?

AppFuse 2.x is a fair amount different from 1.x in that you don't get all the source to start your project with. The main reason for this is to make it possible for you to upgrade your application to a newer version of AppFuse. For a more detailed explanation, please see this mailing list thread.

If you'd like to modify modify AppFuse's core entity classes, see how to modify core classes. If you'd like to convert your project so it doesn't rely on AppFuse dependencies and includes AppFuse's source instead, run mvn appfuse:full-source. This feature is only available in 2.0 M5+ and currently only works with basic archetypes.

Can I run AppFuse 2.x using Java SE 1.4?

AppFuse 2.x requires Java 5 for development, but not for deployment. You should be able to use the Retrotranslator Plugin to convert your WAR to be 1.4-compliant.

How do I customize the header and footer messages in 2.x?

If you would like change the following heading:

Providing integration and style to open source Java

Change src/main/resources/ and change values for the and webapp.tagline keys. To modify the "Your Company Here" text and its URL in the footer, you'll need to modify the and company.url in this same file.

Why don't I have to install Tomcat with 2.x?

If you run mvn integration-test, the Maven Cargo plugin will download and install Tomcat 5.5.17 and run the integration tests against it. If you want to see your project running in a server, you have two options:

  1. Run mvn jetty:run-war - this will fire up a Jetty instance and it will be available at http://localhost:8080.
  2. Run mvn cargo:start -Dcargo.wait=true and your application will be deployed to Tomcat and available at http://localhost:8081/applicationname-version.

You can also add the Maven 2 Tomcat Plugin to your pom.xml and use mvn tomcat:run and mvn tomcat:run-war.

What if I already have Tomcat installed and I'd like to use it?

If you want to change Cargo to point to an existing instance of Tomcat, you should be able to change the bottom of pom.xml from:


You can also deploy to a running instance of Tomcat with Cargo.

What does "basic" and "modular" mean when it comes to AppFuse 2.x archetypes?

Basic archetypes are meant for developing web applications with no re-usable backend. This is the recommended archetype to use with AppFuse 2.x. The tutorials assume you're using this archetype.

Unlike Ant, Maven requires you to have a different "module" for each artifact you want to produce (i.e. JAR or WAR). This is what the modular archetypes are for. If you're an experienced Maven 2 user, you might consider this archetype. It's also useful if you need a backend that can be used by multiple clients.

How do I tell IDEA to ignore deployment descriptors when compiling?

Right-click on the file in the messages window and choose "Exclude From Compile".

How can I export my database using DbUnit?

Running mvn dbunit:export will export your database to target/dbunit/export.xml. You can override the destination location by passing in a -Ddest parameter:

mvn dbunit:export -Ddest=sample-data.xml

How can I change my AppFuse-generated project to use iBATIS or JPA?

As of AppFuse 2.0 M5, it's as easy as changing your changing the <dao.framework> property in your root pom.xml to ibatis or jpa-hibernate. For further instructions, please see the JPA and iBATIS tutorials.

Is there any documentation that describes what all the filters do in web.xml?

See the Web Filters Reference Guide for a list of what each filter in web.xml is used for.

How do I configure LDAP Authentication?

See the LDAP Authentication page for a sample configuration.

How do I debug my application when it's running in Jetty?

Dan Allen has a nice writeup of how to do remoting debugging with Jetty.

  • No labels