TOC PREV NEXT INDEX

Chapter 3 Running the ICEfaces Sample Applications


ICEfaces is bundled with three sample applications: Auction Monitor, Address Form, and Component Showcase.

If you have downloaded the binary distribution of ICEfaces, these applications are available in prebuilt .war files suitable for deployment to Tomcat 6 in the following location:

[install_dir]/icefaces/samples/

If you downloaded the source code distribution of ICEfaces, it is necessary to build the samples which can be accomplished by running ant from the [install_dir]/icefaces/ directory. This will build all of the sample bundles and create distributable .war files suitable for deployment to Tomcat 6 in the distribution directory at:

[install_dir]/icefaces/dist/samples/

If you would like to deploy the sample applications to an application server other than Tomcat 6, you will need to build the .war file appropriate for the target application server. The ant build script provides additional build targets for many popular JEE application servers. Navigate to the directory for a particular sample application and type ant help to see a list of available build targets. Then build the sample application for the application server target of your choice.

For example, ant glassfishv2 creates a .war file deployable to a Glassfish v2 application server.

Note: Individual application servers may require a different set of libraries in the application .war file, depending on which libraries they provide themselves; thus, it is not feasible to deploy the same .war file to all application servers. For details on which libraries are required by various application servers, see the Library Dependencies section in Chapter 4, ICEfaces Reference Information of the ICEfaces Developer's Guide.

If you would like to build a sample for an application server for a specific build target that is not provided, you can use custom build options to create a build that will deploy correctly on your application server. The ant help command provides more information on the available options.

If you are working with Tomcat, the quickest and easiest way to deploy a .war file is to copy the file into the webapps directory of the Tomcat installation. By default, Tomcat periodically checks this directory for updates and, if it finds a new .war file, it automatically deploys the application. Once you've copied the .war file into webapps and Tomcat has deployed the application, you can view and interact with it by opening a web browser and typing in the appropriate URL for the application that you want to browse.
Application
Archive
URL
AuctionMonitor
auctionMonitor.war
http://localhost:8080/auctionMonitor/
AddressForm
address.war
http://localhost:8080/address/
Component Showcase
component-showcase.war
http://localhost:8080/component-showcase/

The sample applications highlight the various features and capabilities that ICEfaces technology provides.



Copyright 2005-2009. ICEsoft Technologies, Inc.
TOC PREV NEXT INDEX