| |
PDF
|
ICEfaces Online Reference |
Building and Deploying timezone1
For the tutorial applications, we rely on Ant as a build tool and Tomcat as the container to run the application. A build.xml file has been provided that can build and deploy the application to Tomcat for you. The build file relies on build.properties for system specific information that it needs to successfully build and deploy the application.
The content of build.properties is as follows:
tomcat.host = localhost tomcat.port = 8080 username = nobody password = nowhere compile.debug = false lib.dir = ../../lib icefaces.jar = ../../lib/icefaces.jar components.jar = ../../lib/icefaces-comps.jar icefaces-facelets.jar = ../../lib/icefaces-facelets.jar1. Edit the build.properties file to suit your environment. You will also need to modify the username and password to correspond to some existing username and password in the Tomcat tomcat-users.xml file or add a user with the manager role to the file if one is not already present.
Note: For security, the default Tomcat configuration does NOT include a username with the manager role. If you have just downloaded and installed Tomcat, you will need to add a manager role in order to deploy to Tomcat using the ant install task. An example tomcat-users.xml file is included in the tutorial directory as a reference. You can also refer to the documentation for Tomcat for more information.
2. To deploy the application using the build file, ensure that you have an account that will let you deploy using the remote deployment mechanism.
<icefaces-install-dir>/tutorial/timezone15. To compile the source code, generate a WAR file with all the required resources and deploy it to the running Tomcat server. From the command line, type:
ant installBy default, the WAR file created includes Sun's JSF reference implementation. If you would like to build a WAR file using MyFaces, type the following instead:
ant -f build_myfaces.xml installThis tells ant to use the build_myfaces.xml file instead of the default build.xml. The generated WAR file contains the appropriate MyFaces libraries and deployment descriptor (web.xml) file.
6. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, alter the URL accordingly.
http://localhost:8080/timezone1If all goes well, you should see the first incarnation of the TimeZone application running in your browser. Clicking a different time zone on the map updates the time and time zone information in the top right of the table.
|
Copyright 2005-2006. ICEsoft Technologies, Inc. http://www.icesoft.com |