Quick-Start FAQ
===============
To learn how to develop your J2EE webapps with AppFuse, see
http://raibledesigns.com/wiki/Wiki.jsp?page=Articles (or docs/index.html if you
downloaded the AppFuse source distribution). You can also download all the
latest documentation to the "docs" directory by running "ant wiki".
To build this application - you must be using Ant 1.6.2+. You will also need
to copy junit.jar into your $ANT_HOME/lib directory.
Then setup Tomcat 4.1.x+ and install an SMTP server on localhost. If you don't
want to install an SMTP server, change web/WEB-INF/classes/mail.properties to
point to an existing one.
To run this application, you will need to perform the following tasks:
1. The default database setup expects a mysql database installed with
an admin user named "root" and no password. If your system is different,
modify properties.xml or build.properties to override the default values.
2. Run "ant setup-db". This creates a mysql database named "appfuse" and
grants the user "test" (password: test) full rights to this database.
3 Test that the db access code works with:
ant test-dao -Dtestcase=UserDAO
ant test-service -Dtestcase=UserManager
4. Setup Tomcat by running "ant setup-tomcat deploy". This puts a MySQL JDBC
driver (and jta.jar) in $CATALINA_HOME/common/lib, and also deploys an
appfuse.xml file to $CATALINA_HOME/webapps ($CATALINA_HOME/conf/Catalina/
localhost on Tomcat 5). It also deploys the application to
$CATALINA_HOME/webapps.
5. Start Tomcat and test the web login using "ant test-canoo -Dtestcase=Login".
If you experience issues with Tomcat, check your build/test/cargo.log file.
** TO SETUP E-MAIL NOTIFICATION OF ERRORS **
Log4j has a pretty slick feature where you can have e-mail messages sent
to you when an ERROR is logged. To set this up, perform the following
steps:
1. Change the property "error.mailTo" in build.properties to be your
e-mail address.
2. Edit WEB-INF/classes/log4j.properties to add "mail" to the rootCategory.
Example: log4j.rootCategory=INFO, stdout, mail
Features/Changes in 1.8.1
============================
- A complete list of issues fixed is at http://tinyurl.com/8v2z9.
- i18n fixes for DateUtil and Canoo WebTest.
- Moved tomcat.properties key/value pairs into properties.xml.
- [Struts] Changed "viewUsers" forward to be a redirect to prevent the
duplicate post problem when deleting a user.
- [MyFaces] Changed all "id" attributes with a period (i.e. address.address)
to use only the later half since MyFaces 1.0.9 does support periods in ids.
- Added page for sponsors at http://appfuse.dev.java.net/sponsors.html
- Added UserSecurityAdvice and interceptor to ensure that only admins
can modify user records. Regular users can still modify their own record.
- Fixed BaseControllerTestCase.objectToRequestParameters() so POJOs that
use inheritance are supported.
- Dependent packages upgraded:
* Cargo 0.5
* Hibernate 3.0.5
* iBATIS 2.1.0
* MyFaces 1.0.9
* Rename Packages 1.1
* Spring 1.2.1
Features/Changes in 1.8
============================
- Replaced Container-Managed Authentication with Acegi Security Framework for
Spring. Minimal changes were necessary - meaning that you could easily
switch back if you wanted to. HowTo documented at:
http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseSecurity
- Massive amount of bug fixes applied to AppGen to allow it to be run multiple
times. Also fixed "id" problems so the POJOs id property is actually looked
up instead of just assuming it's a Long and named "id".
- Fixed project files for Eclipse and IDEA so you can easily run unit tests
from within your IDE. Just run the "compile" task with Ant, refresh your
project and test away!
- [AppGen] Added Query by Example code to the getXXXs(XXX) method of detailed
Hibernate DAOs. Added code to Struts and Spring versions to allow searching
on the list screen by manually passing in name/value pairs of a POJO's
properties on the URL. Doesn't seem to work for filtering by primary key,
which seems reasonable since you'll likely hide the primary key column when
modifying your list screen.
- [Tapestry] Fixed bugs in UserForm.java and UserList.java classes - now role
choices are shown when editing a user or adding a new user.
- Fixed bug where uses could hack the URL in Struts and WebWork versions to
delete users when they don't have the "admin" role.
https://appfuse.dev.java.net/issues/show_bug.cgi?id=121
- Added empty "velocimacro.library" property to "velocityEngine" bean in
applicationContext-service.xml to suppress Velocity errors.
- Changed Transaction Attributes on UserManager so save* rolls back when
the checked UserExistsException is thrown.
- [Struts] Fixed bug in error.jsp that caused it to throw exceptions under
certain conditions: https://appfuse.dev.java.net/issues/show_bug.cgi?id=122.
- [Struts] Modified struts_form.xdt to properly handle Sets when used for
indexed properties.
- Added serialVersionUID variables to all serializable classes.
- Changed IDEA project files so project is loaded as a web module. This
allows Tomcat debugging and taglib resolution in JSPs.
- Increased the default font size of success/error messages since all my
clients have asked me to it when developing a project with AppFuse.
- Added fade.js for using the Fade Anything Technique as documented at
http://www.axentric.com/posts/default/7. Applied fading to messages.
- Improved build.xml file:
* create-tables.sql now deleted when running "clean" target.
* "fixcrlf" target updated to repair more file types on *nix systems.
* Placeholders replaced in applicationContext-hibernate.xml within the
DAO JAR file created by "package-dao" target.
* Simplified token replacement when deploying static web files.
* Improved name replacement when running "new" target.
* Replaced "compile-module" and "test-module" with macrodefs.
* Changed entity include for properties.xml to be an import.
* Moved app-settings.xml properties into properties.xml.
* Changed from 80 characters per line to 120.
- Tests using Dumbster updated to always use "localhost" in case the normal
mail.host is different.
- [Struts] UserAction updated to validate the form within the save() method
to better support i18n.
- Removed unnecessary "database.name" property from PostgreSQL configuration
in build.properties.
- Improved sensitivity for package name replacement in
ConvertUtil.getOpposingObject().
- Fixed hard-coded date format in DateUtil using Spring's LocaleContextHolder.
- [Struts] Changed all "bean:write" tags to "c:out" to prevent errors when
using an unsupported locale.
- [Struts] Added TimestampConverter to converting Timestamps.
- [Spring MVC] BaseFormController updated to make the userManager available to
subclasses.
- Updated LoginServlet to properly handle empty port configurations.
- [Spring MVC] cancelView property added to BaseFormController.
- Added property to userList DisplayTag to improve browser support for PDF
export.
- Dependent packages upgraded:
* Display Tag 1.0
* Dumbster 1.5
* Hibernate 3.0.2
* Log4j 1.2.9
* MySQL JDBC Driver 3.1.7
* PMD 3.0
* PostgreSQL JDBC Driver 8.0-310
* SiteMesh 2.2.1
* Spring 1.2 RC2
* StrutsTestCase 2.1.3
* XDoclet 1.2.3
- Dependent packages added:
* Acegi Security 0.8.2
- Dependent packaged removed:
* JUnitDoclet 1.0.2
Features/Changes in 1.7
============================
- Added support for JSF (MyFaces) and Tapestry as web framework options.
http://raibledesigns.com/page/rd?anchor=integrating_jsf_and_tapestry_into_appfuse
- Added support for exporting PDFs from a displaytag-rendered table