I'm new in Apache myfaces but i worked with sun
jsf RI before successfully.
for use myfaces tiles i change my application setting as follow
in WEB-INF/lib i put this jars
commons-beanutils-1.6.1.jar
commons-codec-1.2.jar
commons-collections-3.0.jar
commons-digester-1.5.jar
commons-el.jar
commons-fileupload-1.0.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
jaxen-full.jar
jsp-2.0.jar
myfaces-extensions.jar
myfaces-impl.jar
myfaces-jsf-api.jar
myfaces-xdoclet.jar
saxpath.jar
standard.jar
jstl.jar
struts.jar
i put struts-tiles.tld in WEB-INF directory
i change configuration files as below
web.xml
----------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>tmf</display-name>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
<description>Comma separated list of URIs of (additional) faces config files.
(e.g. /WEB-INF/my-config.xml)
See JSF 1.0 PRD2, 10.3.2</description>
</context-param>
<context-param>
<param-name>tiles-definitions</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
</context-param>
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<
servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>
http://struts.apache.org/tags-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
</web-app>
------------------------------------------------------------------
faces-config.xml
------------------------
<faces-config xmlns="http://java.sun.com/JSF/Configuration">
<application>
<view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler>
</application>
</faces-config>
tiles.xml
------------------------
<tiles-definitions>
<definition name="layout" path="template.jsp" >
<put name="header" value="header.jsp" />
<put name="menu" value="navigation.jsp" />
</definition>
<definition name="/page1.tiles" extends="layout" >
<put name="body" value="/page1.jsp" />
</definition>
</tiles-definitions>
------------------------------------------
i have index.jsp that redirect to page1.jsf but when i try this url
http://localhost:8080/faceproject/index.jsp i see this error
error
---------------------------------------------------
Unable to open location: Document not found on server
i use jbuilder2005 and tomcat5.0
i follow apache sample code to use myfaces with tiles.
please tell me what's wrong i can't accesss to any page with tiles support or not.
Regard
Solmaz Anvar
