|
|
History of: GettingStarted
Version: 48
Getting started
What you need for the Examples Application
Installing and Running the Examples
- Unpack the MyFaces examples archive myfaces-1.0.7-examples.tgz to a directory of your choice.
- Remove any previous MyFaces webapps from your Tomcat installation and clean up your Tomcat work dir. Also make sure that there is no jsf-api.jar (i.e. Suns API implementation) in the classpath or in one of Tomcat's lib directories (common/lib or shared/lib).
- Copy the file myfaces-examples.war to the webapps dir of your Tomcat installation directory.
- (Re)start Tomcat (there is a known log4j issue - see KnownIssues if you get errors!)
- Start your browser and enjoy it at http://localhost:8080/myfaces-examples.
Installing and Running Sun JSF-RI Samples with MyFaces
(())
Using MyFaces in your own web application
- Look at the compatibility list to find out if your servlet container is supported.
- Download the latest MyFaces binary release (myfaces-1.0.7.tgz).
- Copy all jar files from the lib directory (myfaces.jar, cos.jar, jstl.jar, commons-el.jar and commons-logging.jar) to the WEB-INF/lib dir of your Webapplication.
- Make sure that there is no jsf-api.jar (i.e. Suns API implementation) in the classpath or in one of Tomcat's lib directories (common/lib or shared/lib).
- Configure your webapp's web.xml file (see conf/web.xml for example and documentation)
- Add the following lines to your JSPs:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
- To be able to use the MyFaces extensions add the following line to your JSPs:
<%@ taglib uri="http://myfaces.sourceforge.net/tld/myfaces_ext_0_9.tld" prefix="x"%>
|
|