You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by zargarf <fa...@gmail.com> on 2007/10/24 19:00:20 UTC

Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.
However, when I try to deploy the war file to Tomcat, I get a
java.lang.NoClassDefFoundError:
org.apache.struts.tiles.DefinitionsFactoryException (which surprises me as
I'm using the jars for the standalone version of tiles). Do any of you know
why it's looking for org.apache.struts.tiles.DefinitionsFactoryException
instead of org.apache.tiles.DefinitionsFactoryException? 

Cheers 
Faisal 

This is the stacktrace: 

24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext listenerStart 
SEVERE: Exception sending context initialized event to listener instance of
class org.apache.myfaces.webapp.StartupServletContextListener 
java.lang.NoClassDefFoundError:
org.apache.struts.tiles.DefinitionsFactoryException 
        at java.lang.J9VMInternals.verifyImpl(Native Method) 
        at java.lang.J9VMInternals.verify(J9VMInternals.java:59) 
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:120) 
        at sun.reflect.NativeConstructorAccess 

orImpl.newInstance0(Native Method) 
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67) 
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
        at java.lang.reflect.Constructor.newInstance(Constructor.java:521) 
        at
org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779) 
        at
org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699) 
        at
org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230) 
        at
org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68) 
        at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51) 
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) 
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) 
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) 
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) 
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) 
        at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) 
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515) 
        at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) 
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
        at java.lang.reflect.Method.invoke(Method.java:615) 
        at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458) 
        at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231) 
        at
com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238) 
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833) 
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) 
        at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394) 
        at
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635) 
        at
org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) 
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
        at java.lang.Thread.run(Thread.java:799) 


Below, you can find the .pom file, the web.xml and the faces-config. 

Here is my application.pom file for maven<?xml version="1.0"
encoding="UTF-8"?> 

<project xmlns="http://maven.apache.org/POM/4.0.0" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>com.zargonsolutions</groupId> 
    <artifactId>zargonsolutions_myfaces_webapp</artifactId> 
    <packaging>war</packaging> 
    <version>1.0-SNAPSHOT</version> 
    <name>A custom project using myfaces</name> 
    <url>http://www.myorganization.org</url> 

    <build> 
        <finalName>zargonsolutions_myfaces_webapp</finalName> 
    </build> 

    <!-- Profile to run jetty, so the tomcat jars are included in the
bundle. They are not included by default --> 
    <profiles> 
        <profile> 
            <id>jettyConfig</id> 
            <build> 
                <plugins> 
                    <plugin> 
                        <groupId>org.mortbay.jetty</groupId> 
                        <artifactId>maven-jetty-plugin</artifactId> 
                        <configuration> 
                            <scanIntervalSeconds>10</scanIntervalSeconds> 
                        </configuration> 
                    </plugin> 
                </plugins> 
            </build> 

            <dependencies> 
                <dependency> 
                    <groupId>javax.servlet</groupId> 
                    <artifactId>jsp-api</artifactId> 
                    <version>2.0</version> 
                    <scope>compile</scope> 
                </dependency> 
                <dependency> 
                    <groupId>tomcat</groupId> 
                    <artifactId>jasper-compiler</artifactId> 
                    <version>5.5.9</version> 
                    <scope>compile</scope> 
                </dependency> 
                <dependency> 
                    <groupId>tomcat</groupId> 
                    <artifactId>jasper-runtime</artifactId> 
                    <version>5.5.9</version> 
                    <scope>compile</scope> 
                </dependency> 
                <dependency> 
                    <groupId>tomcat</groupId> 
                    <artifactId>jasper-compiler-jdt</artifactId> 
                    <version>5.5.9</version> 
                    <scope>compile</scope> 
                </dependency> 
            </dependencies> 

            <pluginRepositories> 
                <!-- Repository to get the jetty plugin --> 
                <pluginRepository> 
                    <id>mortbay-repo</id> 
                    <name>mortbay-repo</name> 
                    <url>http://www.mortbay.org/maven2/snapshot</url> 
                </pluginRepository> 
            </pluginRepositories> 

        </profile> 
    </profiles> 

    <repositories> 
        <repository> 
            <releases> 
                <enabled>false</enabled> 
            </releases> 
            <snapshots> 
                <enabled>true</enabled> 
            </snapshots> 
            <id>apache-maven-snapshots</id> 
            <url>http://people.apache.org/repo/m2-snapshot-repository</url> 
        </repository> 
    </repositories> 

    <!-- Project dependencies --> 
    <dependencies> 
        <dependency> 
            <groupId>org.apache.myfaces.core</groupId> 
            <artifactId>myfaces-api</artifactId> 
            <version>1.1.6-SNAPSHOT</version> 
            <scope>compile</scope> 
        </dependency> 
        
        <dependency> 
            <groupId>org.apache.myfaces.core</groupId> 
            <artifactId>myfaces-impl</artifactId> 
            <version>1.1.6-SNAPSHOT</version> 
            <scope>compile</scope> 
        </dependency> 

        <dependency> 
            <groupId>myfaces</groupId> 
            <artifactId>tomahawk</artifactId> 
            <version>1.1.1</version> 
            <scope>compile</scope> 
        </dependency> 

        <dependency> 
            <groupId>junit</groupId> 
            <artifactId>junit</artifactId> 
            <version>4.0</version> 
            <scope>test</scope> 
        </dependency> 
  <dependency> 
    <groupId>org.apache.tiles</groupId> 
    <artifactId>tiles-core</artifactId> 
    <version>2.0-SNAPSHOT</version> 
  </dependency> 
    <dependency> 
    <groupId>org.apache.tiles</groupId> 
    <artifactId>tiles-jsp</artifactId> 
    <version>2.0.4</version> 
  </dependency> 
  <dependency> 
    <groupId>org.apache.tiles</groupId> 
    <artifactId>tiles-api</artifactId> 
    <version>2.0.4</version> 
  </dependency> 

    </dependencies> 


</project> 

Here is the web.xml 

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" 
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
         version="2.4"> 

    <description>MyProject web.xml</description> 

    
        
    <context-param> 
        <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 
            Attention: You do not need to put /WEB-INF/faces-config.xml in
here. 
        </description> 
        <param-name>javax.faces.CONFIG_FILES</param-name> 
        <param-value>/WEB-INF/faces-config.xml</param-value> 
    </context-param> 
    <context-param> 
        <description>State saving method: "client" or "server" (= default) 
            See JSF Specification 2.5.3</description> 
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
        <param-value>client</param-value> 
    </context-param> 
    <context-param> 
        <description>Only applicable if state saving method is "server" (=
default). 
            Defines the amount (default = 20) of the latest views are stored
in session.</description> 
       
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name> 
        <param-value>20</param-value> 
    </context-param> 
    <context-param> 
        <description>Only applicable if state saving method is "server" (=
default). 
            If true (default) the state will be serialized to a byte stream
before it 
            is written to the session. 
            If false the state will not be serialized to a byte
stream.</description> 
       
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name> 
        <param-value>true</param-value> 
    </context-param> 
    <context-param> 
        <description>Only applicable if state saving method is "server" (=
default) and if 
            org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
default) 
            If true (default) the serialized state will be compressed before
it 
            is written to the session. If false the state will not be
compressed.</description> 
       
<param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name> 
        <param-value>true</param-value> 
    </context-param> 
    <context-param> 
        <description>This parameter tells MyFaces if javascript code should
be allowed in the 
            rendered HTML output. 
            If javascript is allowed, command_link anchors will have
javascript code 
            that submits the corresponding form. 
            If javascript is not allowed, the state saving info and nested
parameters 
            will be added as url parameters. 
            Default: "true"</description> 
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name> 
        <param-value>true</param-value> 
    </context-param> 
    <context-param> 
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name> 
        <param-value>false</param-value> 
    </context-param> 
    <context-param> 
        <description>If true, rendered HTML code will be formatted, so that
it is "human readable". 
            i.e. additional line separators and whitespace will be written,
that do not 
            influence the HTML code. 
            Default: "true"</description> 
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name> 
        <param-value>true</param-value> 
    </context-param> 
    <context-param> 
        <description>If true, a javascript function will be rendered that is
able to restore the 
            former vertical scroll on every request. Convenient feature if
you have pages 
            with long lists and you do not want the browser page to always
jump to the top 
            if you trigger a link or button action that stays on the same
page. 
            Default: "false"</description> 
        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name> 
        <param-value>true</param-value> 
    </context-param> 

    <context-param> 
        <description>Used for encrypting view state. Only relevant for
client side 
            state saving. See MyFaces wiki/web site documentation for
instructions 
            on how to configure an application for diffenent encryption
strengths. 
        </description> 
        <param-name>org.apache.myfaces.SECRET</param-name> 
        <param-value>NzY1NDMyMTA=</param-value> 
    </context-param> 

    <context-param> 
        <description> 
            Validate managed beans, navigation rules and ensure that forms
are not nested. 
        </description> 
        <param-name>org.apache.myfaces.VALIDATE</param-name> 
        <param-value>true</param-value> 
    </context-param> 
    
    <context-param> 
        <description> 
            Treat readonly same as if disabled attribute was set for select
elements. 
        </description> 
       
<param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name> 
        <param-value>true</param-value> 
    </context-param>     
    
    <context-param> 
        <description> 
            Use the defined class as the class which will be called when a
resource is added to the 
            ExtensionFilter handling. Using StreamingAddResource here helps
with performance. If you want to add 
            custom components and want to use the ExtensionFilter, you need
to provide your custom implementation here. 
        </description> 
        <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> 
       
<param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value> 
    </context-param>         

    <context-param> 
        <description> 
            Virtual path in the URL which triggers loading of resources for
the MyFaces extended components 
            in the ExtensionFilter. 
        </description> 
        <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name> 
        <param-value>/faces/myFacesExtensionResource</param-value> 
    </context-param> 
    
    <context-param> 
        <description> 
            Check if the extensions-filter has been properly configured. 
        </description> 
        <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name> 
        <param-value>true</param-value> 
    </context-param>     

    <context-param> 
        <description> 
            Define partial state saving as true/false. 
        </description> 
        <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name> 
        <param-value>false</param-value> 
    </context-param>     

    <!-- Extensions Filter --> 
    <filter> 
        <filter-name>extensionsFilter</filter-name> 
       
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class> 
        <init-param> 
            <description>Set the size limit for uploaded files. 
                Format: 10 - 10 bytes 
                10k - 10 KB 
                10m - 10 MB 
                1g - 1 GB</description> 
            <param-name>uploadMaxFileSize</param-name> 
            <param-value>100m</param-value> 
        </init-param> 
        <init-param> 
            <description>Set the threshold size - files 
                below this limit are stored in memory, files above 
                this limit are stored on disk. 

                Format: 10 - 10 bytes 
                10k - 10 KB 
                10m - 10 MB 
                1g - 1 GB</description> 
            <param-name>uploadThresholdSize</param-name> 
            <param-value>100k</param-value> 
        </init-param> 
    </filter> 

    <filter-mapping> 
        <filter-name>extensionsFilter</filter-name> 
        <url-pattern>*.jsf</url-pattern> 
    </filter-mapping> 
    <filter-mapping> 
        <filter-name>extensionsFilter</filter-name> 
        <url-pattern>/faces/*</url-pattern> 
    </filter-mapping> 

    <!-- Listener, to allow Jetty serving MyFaces apps --> 
    <listener> 
       
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> 
    </listener> 
    
    
    

    <!-- Faces Servlet --> 
    <servlet> 
        <servlet-name>Faces Servlet</servlet-name> 
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
        <load-on-startup>1</load-on-startup> 
    </servlet> 




<servlet> 
    <servlet-name>tiles</servlet-name> 
    <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class> 
    <init-param> 
       
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name> 
        <param-value>/WEB-INF/tiles-def.xml</param-value> 
    </init-param> 
    <load-on-startup>2</load-on-startup> 
</servlet> 
        
    <!-- Faces Servlet Mapping --> 
    <servlet-mapping> 
        <servlet-name>Faces Servlet</servlet-name> 
        <url-pattern>*.jsf</url-pattern> 
    </servlet-mapping> 



        
    <!-- Welcome files --> 
    <welcome-file-list> 
        <welcome-file>index.jsp</welcome-file> 
        <welcome-file>index.html</welcome-file> 
    </welcome-file-list> 

</web-app> 


Here is the faces-config 

<faces-config> 
        <application> 
   
<view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler> 
</application> 

        <!-- managed beans of the simple hello world app --> 
        <managed-bean> 
                <managed-bean-name>helloWorldBacking</managed-bean-name> 
               
<managed-bean-class>org.apache.myfaces.blank.HelloWorldBacking</managed-bean-class> 
                <managed-bean-scope>request</managed-bean-scope> 
        </managed-bean> 
        
        <!-- navigation rules for helloWorld.jsp --> 
        <navigation-rule> 
                <from-view-id>/helloWorld.jsp</from-view-id> 
                <navigation-case> 
                        <from-outcome>success</from-outcome> 
                        <to-view-id>/page2.jsp</to-view-id> 
                </navigation-case> 
        </navigation-rule> 
        
        <!-- navigation rules for page2.jsp --> 
        <navigation-rule> 
                <from-view-id>/page2.jsp</from-view-id> 
                <navigation-case> 
                        <from-outcome>back</from-outcome> 
                        <to-view-id>/helloWorld.jsp</to-view-id> 
                </navigation-case> 
        </navigation-rule> 
</faces-config> 

Here is the tiles-def 

<!DOCTYPE tiles-definitions PUBLIC 
       "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" 
       "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"> 
<definition name="zargonsolutions.layout" 
        template="/pages/template.jsp"> 
        <put-attribute name="header" value="/pages/includes/header.jsp" /> 
        <put-attribute name="footer" value="/pages/includes/footer.jsp" /> 
        <put-attribute name="title" value="Welcome to Zargon Solutions" /> 
</definition> 

<definition name="/pages/home.tiles" extends="zargonsolutions.layout"> 
        <put name="body" value="/pages/home.jsp" /> 
        <put name="title" value="Zargon Solutions - Home Page" /> 
</definition> 




-- 
View this message in context: http://www.nabble.com/Standalone-Tiles-with-myFaces---DefinitionsFactoryException-class-not-found-tf4685057.html#a13388265
Sent from the tiles users mailing list archive at Nabble.com.


Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/25, Ray Clough <rc...@kamakuraco.com>:
>
> Maybe you're doing some of the new features Tiles has now (which I'm not
> using)
>


Ray, what are you referring to?

Antonio

Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by zargarf <fa...@gmail.com>.
There is no reference to anything struts in my code, I can only assume that
it's coming from within one of the jars. But I'm using maven to build the
dependencies


Ray Clough-2 wrote:
> 
> 
> 
> 
>   
> 
> 
> It is absolutely getting that reference to the
> struts.tiles.DefinitionsFactory from something in your app which is
> from Struts.&nbsp; Originally I used that class with Struts-Tiles plugin,
> but when I went to standalone Tiles, we modified the listener
> declaration to use the Tiles standalone DefinitionFactory.&nbsp;&nbsp; I
> use this
> in web.xml.&nbsp; Maybe you're doing some of the new features Tiles has
> now
> (which I'm not using), but this works great for us.&nbsp; I know that
> there
> are various ways of loading Tiles, eg using a startup servlet instead
> of the listener I'm specifying below. 
> 
> &nbsp;&nbsp;&nbsp; &lt;!-- Define Tiles config files --&gt; 
> &nbsp;&nbsp;&nbsp; &lt;context-param&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param-name&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/param-name&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param-value&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> /WEB-INF/config/tiles_rp.xml, /WEB-INF/config/tiles_dm.xml,
> /WEB-INF/config/tiles_pm.xml,
> /WEB-INF/config/tiles_as.xml&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/param-value&gt; 
> &nbsp;&nbsp;&nbsp; &lt;/context-param&gt; 
> ... 
> &nbsp;&nbsp;&nbsp; &lt;listener&gt; 
> &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;listener-class&gt; 
> &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> org.apache.tiles.web.startup.TilesListener 
> &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/listener-class&gt; 
> &nbsp;&nbsp;&nbsp; &lt;/listener&gt; 
> ... 
> &nbsp;&nbsp;&nbsp; &lt;!-- Tiles-2 Dispatch Servlet --&gt; 
> &nbsp;&nbsp;&nbsp; &lt;servlet&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;Tiles Dispatch
> Servlet&lt;/servlet-name&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;servlet-class&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> org.apache.tiles.web.util.TilesDispatchServlet 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/servlet-class&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; 
> &nbsp;&nbsp;&nbsp; &lt;/servlet&gt; 
> &nbsp;&nbsp;&nbsp; &lt;servlet-mapping&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;Tiles Dispatch
> Servlet&lt;/servlet-name&gt; 
> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
> &lt;url-pattern&gt;*.tiles&lt;/url-pattern&gt; 
> &nbsp;&nbsp;&nbsp; &lt;/servlet-mapping&gt; 
> 
> 
> zargarf wrote:
> 
>   No there's nothing referencing struts in the web.xml and I'm not using
> anything struts oriented, just myfaces
> 
> 
> Ray Clough-2 wrote:
>   
>   
>     Is your web.xml file referring to some struts artifact or Struts-Tiles 
> plugin?  I use standalone Tiles and MyFaces without problems (app also 
> uses Struts, Tomahawk, Trinidad).  Does your app otherwise use Struts, 
> and if so which version?  If you use struts, but not the Struts2-Tiles 
> plugin, you can should the plugin jar.
> - Ray Clough
> 
> 
> 
> zargarf wrote:
>     
>     
>       Hi, I'm trying to use myFaces and Standalone Tiles together using
> maven2.
> However, when I try to deploy the war file to Tomcat, I get a
> java.lang.NoClassDefFoundError:
> org.apache.struts.tiles.DefinitionsFactoryException (which surprises me
> as
> I'm using the jars for the standalone version of tiles). Do any of you
> know
> why it's looking for org.apache.struts.tiles.DefinitionsFactoryException
> instead of org.apache.tiles.DefinitionsFactoryException? 
> 
> Cheers 
> Faisal 
> 
> This is the stacktrace: 
> 
> 24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext
> listenerStart 
> SEVERE: Exception sending context initialized event to listener instance
> of
> class org.apache.myfaces.webapp.StartupServletContextListener 
> java.lang.NoClassDefFoundError:
> org.apache.struts.tiles.DefinitionsFactoryException 
>         at java.lang.J9VMInternals.verifyImpl(Native Method) 
>         at java.lang.J9VMInternals.verify(J9VMInternals.java:59) 
>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:120) 
>         at sun.reflect.NativeConstructorAccess 
> 
> orImpl.newInstance0(Native Method) 
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67) 
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
>         at
> java.lang.reflect.Constructor.newInstance(Constructor.java:521) 
>         at
> org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779) 
>         at
> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699) 
>         at
> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230) 
>         at
> org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68) 
>         at
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51) 
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) 
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) 
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) 
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) 
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) 
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) 
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515) 
>         at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) 
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
>         at java.lang.reflect.Method.invoke(Method.java:615) 
>         at
> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458) 
>         at
> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231) 
>         at
> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238) 
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833) 
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) 
>         at
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394) 
>         at
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635) 
>         at
> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) 
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) 
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
>         at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
>         at java.lang.Thread.run(Thread.java:799) 
> 
> 
> Below, you can find the .pom file, the web.xml and the faces-config. 
> 
> Here is my application.pom file for maven&lt;?xml version="1.0"
> encoding="UTF-8"?&gt; 
> 
> &lt;project xmlns= "http://maven.apache.org/POM/4.0.0"  
>          xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"  
>          xsi:schemaLocation= "http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd" &gt; 
>     &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; 
>     &lt;groupId&gt;com.zargonsolutions&lt;/groupId&gt; 
>     &lt;artifactId&gt;zargonsolutions_myfaces_webapp&lt;/artifactId&gt; 
>     &lt;packaging&gt;war&lt;/packaging&gt; 
>     &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; 
>     &lt;name&gt;A custom project using myfaces&lt;/name&gt; 
>     &lt;url&gt; http://www.myorganization.org &lt;/url&gt; 
> 
>     &lt;build&gt; 
>         &lt;finalName&gt;zargonsolutions_myfaces_webapp&lt;/finalName&gt; 
>     &lt;/build&gt; 
> 
>     &lt;!-- Profile to run jetty, so the tomcat jars are included in the
> bundle. They are not included by default --&gt; 
>     &lt;profiles&gt; 
>         &lt;profile&gt; 
>             &lt;id&gt;jettyConfig&lt;/id&gt; 
>             &lt;build&gt; 
>                 &lt;plugins&gt; 
>                     &lt;plugin&gt; 
>                         &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt; 
>                        
> &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt; 
>                         &lt;configuration&gt; 
>                            
> &lt;scanIntervalSeconds&gt;10&lt;/scanIntervalSeconds&gt; 
>                         &lt;/configuration&gt; 
>                     &lt;/plugin&gt; 
>                 &lt;/plugins&gt; 
>             &lt;/build&gt; 
> 
>             &lt;dependencies&gt; 
>                 &lt;dependency&gt; 
>                     &lt;groupId&gt;javax.servlet&lt;/groupId&gt; 
>                     &lt;artifactId&gt;jsp-api&lt;/artifactId&gt; 
>                     &lt;version&gt;2.0&lt;/version&gt; 
>                     &lt;scope&gt;compile&lt;/scope&gt; 
>                 &lt;/dependency&gt; 
>                 &lt;dependency&gt; 
>                     &lt;groupId&gt;tomcat&lt;/groupId&gt; 
>                     &lt;artifactId&gt;jasper-compiler&lt;/artifactId&gt; 
>                     &lt;version&gt;5.5.9&lt;/version&gt; 
>                     &lt;scope&gt;compile&lt;/scope&gt; 
>                 &lt;/dependency&gt; 
>                 &lt;dependency&gt; 
>                     &lt;groupId&gt;tomcat&lt;/groupId&gt; 
>                     &lt;artifactId&gt;jasper-runtime&lt;/artifactId&gt; 
>                     &lt;version&gt;5.5.9&lt;/version&gt; 
>                     &lt;scope&gt;compile&lt;/scope&gt; 
>                 &lt;/dependency&gt; 
>                 &lt;dependency&gt; 
>                     &lt;groupId&gt;tomcat&lt;/groupId&gt; 
>                    
> &lt;artifactId&gt;jasper-compiler-jdt&lt;/artifactId&gt; 
>                     &lt;version&gt;5.5.9&lt;/version&gt; 
>                     &lt;scope&gt;compile&lt;/scope&gt; 
>                 &lt;/dependency&gt; 
>             &lt;/dependencies&gt; 
> 
>             &lt;pluginRepositories&gt; 
>                 &lt;!-- Repository to get the jetty plugin --&gt; 
>                 &lt;pluginRepository&gt; 
>                     &lt;id&gt;mortbay-repo&lt;/id&gt; 
>                     &lt;name&gt;mortbay-repo&lt;/name&gt; 
>                     &lt;url&gt; http://www.mortbay.org/maven2/snapshot
> &lt;/url&gt; 
>                 &lt;/pluginRepository&gt; 
>             &lt;/pluginRepositories&gt; 
> 
>         &lt;/profile&gt; 
>     &lt;/profiles&gt; 
> 
>     &lt;repositories&gt; 
>         &lt;repository&gt; 
>             &lt;releases&gt; 
>                 &lt;enabled&gt;false&lt;/enabled&gt; 
>             &lt;/releases&gt; 
>             &lt;snapshots&gt; 
>                 &lt;enabled&gt;true&lt;/enabled&gt; 
>             &lt;/snapshots&gt; 
>             &lt;id&gt;apache-maven-snapshots&lt;/id&gt; 
>            
> &lt;url&gt; http://people.apache.org/repo/m2-snapshot-repository
> &lt;/url&gt; 
>         &lt;/repository&gt; 
>     &lt;/repositories&gt; 
> 
>     &lt;!-- Project dependencies --&gt; 
>     &lt;dependencies&gt; 
>         &lt;dependency&gt; 
>             &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt; 
>             &lt;artifactId&gt;myfaces-api&lt;/artifactId&gt; 
>             &lt;version&gt;1.1.6-SNAPSHOT&lt;/version&gt; 
>             &lt;scope&gt;compile&lt;/scope&gt; 
>         &lt;/dependency&gt; 
>         
>         &lt;dependency&gt; 
>             &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt; 
>             &lt;artifactId&gt;myfaces-impl&lt;/artifactId&gt; 
>             &lt;version&gt;1.1.6-SNAPSHOT&lt;/version&gt; 
>             &lt;scope&gt;compile&lt;/scope&gt; 
>         &lt;/dependency&gt; 
> 
>         &lt;dependency&gt; 
>             &lt;groupId&gt;myfaces&lt;/groupId&gt; 
>             &lt;artifactId&gt;tomahawk&lt;/artifactId&gt; 
>             &lt;version&gt;1.1.1&lt;/version&gt; 
>             &lt;scope&gt;compile&lt;/scope&gt; 
>         &lt;/dependency&gt; 
> 
>         &lt;dependency&gt; 
>             &lt;groupId&gt;junit&lt;/groupId&gt; 
>             &lt;artifactId&gt;junit&lt;/artifactId&gt; 
>             &lt;version&gt;4.0&lt;/version&gt; 
>             &lt;scope&gt;test&lt;/scope&gt; 
>         &lt;/dependency&gt; 
>   &lt;dependency&gt; 
>     &lt;groupId&gt;org.apache.tiles&lt;/groupId&gt; 
>     &lt;artifactId&gt;tiles-core&lt;/artifactId&gt; 
>     &lt;version&gt;2.0-SNAPSHOT&lt;/version&gt; 
>   &lt;/dependency&gt; 
>     &lt;dependency&gt; 
>     &lt;groupId&gt;org.apache.tiles&lt;/groupId&gt; 
>     &lt;artifactId&gt;tiles-jsp&lt;/artifactId&gt; 
>     &lt;version&gt;2.0.4&lt;/version&gt; 
>   &lt;/dependency&gt; 
>   &lt;dependency&gt; 
>     &lt;groupId&gt;org.apache.tiles&lt;/groupId&gt; 
>     &lt;artifactId&gt;tiles-api&lt;/artifactId&gt; 
>     &lt;version&gt;2.0.4&lt;/version&gt; 
>   &lt;/dependency&gt; 
> 
>     &lt;/dependencies&gt; 
> 
> 
> &lt;/project&gt; 
> 
> Here is the web.xml 
> 
> &lt;web-app xmlns= "http://java.sun.com/xml/ns/j2ee"  
>          xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"  
>          xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"  
>          version="2.4"&gt; 
> 
>     &lt;description&gt;MyProject web.xml&lt;/description&gt; 
> 
>     
>         
>     &lt;context-param&gt; 
>         &lt;description&gt;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 
>             Attention: You do not need to put /WEB-INF/faces-config.xml
> in
> here. 
>         &lt;/description&gt; 
>         &lt;param-name&gt;javax.faces.CONFIG_FILES&lt;/param-name&gt; 
>         &lt;param-value&gt;/WEB-INF/faces-config.xml&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     &lt;context-param&gt; 
>         &lt;description&gt;State saving method: "client" or "server" (=
> default) 
>             See JSF Specification 2.5.3&lt;/description&gt; 
>        
> &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt; 
>         &lt;param-value&gt;client&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     &lt;context-param&gt; 
>         &lt;description&gt;Only applicable if state saving method is
> "server"
> (=
> default). 
>             Defines the amount (default = 20) of the latest views are
> stored
> in session.&lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION&lt;/param-name&gt; 
>         &lt;param-value&gt;20&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     &lt;context-param&gt; 
>         &lt;description&gt;Only applicable if state saving method is
> "server"
> (=
> default). 
>             If true (default) the state will be serialized to a byte
> stream
> before it 
>             is written to the session. 
>             If false the state will not be serialized to a byte
> stream.&lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.SERIALIZE_STATE_IN_SESSION&lt;/param-name&gt; 
>         &lt;param-value&gt;true&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     &lt;context-param&gt; 
>         &lt;description&gt;Only applicable if state saving method is
> "server"
> (=
> default) and if 
>             org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
> default) 
>             If true (default) the serialized state will be compressed
> before
> it 
>             is written to the session. If false the state will not be
> compressed.&lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.COMPRESS_STATE_IN_SESSION&lt;/param-name&gt; 
>         &lt;param-value&gt;true&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     &lt;context-param&gt; 
>         &lt;description&gt;This parameter tells MyFaces if javascript code
> should
> be allowed in the 
>             rendered HTML output. 
>             If javascript is allowed, command_link anchors will have
> javascript code 
>             that submits the corresponding form. 
>             If javascript is not allowed, the state saving info and
> nested
> parameters 
>             will be added as url parameters. 
>             Default: "true"&lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.ALLOW_JAVASCRIPT&lt;/param-name&gt; 
>         &lt;param-value&gt;true&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     &lt;context-param&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.DETECT_JAVASCRIPT&lt;/param-name&gt; 
>         &lt;param-value&gt;false&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     &lt;context-param&gt; 
>         &lt;description&gt;If true, rendered HTML code will be formatted,
> so
> that
> it is "human readable". 
>             i.e. additional line separators and whitespace will be
> written,
> that do not 
>             influence the HTML code. 
>             Default: "true"&lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.PRETTY_HTML&lt;/param-name&gt; 
>         &lt;param-value&gt;true&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     &lt;context-param&gt; 
>         &lt;description&gt;If true, a javascript function will be rendered
> that
> is
> able to restore the 
>             former vertical scroll on every request. Convenient feature
> if
> you have pages 
>             with long lists and you do not want the browser page to
> always
> jump to the top 
>             if you trigger a link or button action that stays on the same
> page. 
>             Default: "false"&lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.AUTO_SCROLL&lt;/param-name&gt; 
>         &lt;param-value&gt;true&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
> 
>     &lt;context-param&gt; 
>         &lt;description&gt;Used for encrypting view state. Only relevant
> for
> client side 
>             state saving. See MyFaces wiki/web site documentation for
> instructions 
>             on how to configure an application for diffenent encryption
> strengths. 
>         &lt;/description&gt; 
>         &lt;param-name&gt;org.apache.myfaces.SECRET&lt;/param-name&gt; 
>         &lt;param-value&gt;NzY1NDMyMTA=&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
> 
>     &lt;context-param&gt; 
>         &lt;description&gt; 
>             Validate managed beans, navigation rules and ensure that
> forms
> are not nested. 
>         &lt;/description&gt; 
>         &lt;param-name&gt;org.apache.myfaces.VALIDATE&lt;/param-name&gt; 
>         &lt;param-value&gt;true&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     
>     &lt;context-param&gt; 
>         &lt;description&gt; 
>             Treat readonly same as if disabled attribute was set for
> select
> elements. 
>         &lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS&lt;/param-name&gt; 
>         &lt;param-value&gt;true&lt;/param-value&gt; 
>     &lt;/context-param&gt;     
>     
>     &lt;context-param&gt; 
>         &lt;description&gt; 
>             Use the defined class as the class which will be called when
> a
> resource is added to the 
>             ExtensionFilter handling. Using StreamingAddResource here
> helps
> with performance. If you want to add 
>             custom components and want to use the ExtensionFilter, you
> need
> to provide your custom implementation here. 
>         &lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.ADD_RESOURCE_CLASS&lt;/param-name&gt; 
>        
> &lt;param-value&gt;org.apache.myfaces.renderkit.html.util.DefaultAddResource&lt;/param-value&gt; 
>     &lt;/context-param&gt;         
> 
>     &lt;context-param&gt; 
>         &lt;description&gt; 
>             Virtual path in the URL which triggers loading of resources
> for
> the MyFaces extended components 
>             in the ExtensionFilter. 
>         &lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.RESOURCE_VIRTUAL_PATH&lt;/param-name&gt; 
>        
> &lt;param-value&gt;/faces/myFacesExtensionResource&lt;/param-value&gt; 
>     &lt;/context-param&gt; 
>     
>     &lt;context-param&gt; 
>         &lt;description&gt; 
>             Check if the extensions-filter has been properly configured. 
>         &lt;/description&gt; 
>        
> &lt;param-name&gt;org.apache.myfaces.CHECK_EXTENSIONS_FILTER&lt;/param-name&gt; 
>         &lt;param-value&gt;true&lt;/param-value&gt; 
>     &lt;/context-param&gt;     
> 
>     &lt;context-param&gt; 
>         &lt;description&gt; 
>             Define partial state saving as true/false. 
>         &lt;/description&gt; 
>        
> &lt;param-name&gt;javax.faces.PARTIAL_STATE_SAVING_METHOD&lt;/param-name&gt; 
>         &lt;param-value&gt;false&lt;/param-value&gt; 
>     &lt;/context-param&gt;     
> 
>     &lt;!-- Extensions Filter --&gt; 
>     &lt;filter&gt; 
>         &lt;filter-name&gt;extensionsFilter&lt;/filter-name&gt; 
>        
> &lt;filter-class&gt;org.apache.myfaces.webapp.filter.ExtensionsFilter&lt;/filter-class&gt; 
>         &lt;init-param&gt; 
>             &lt;description&gt;Set the size limit for uploaded files. 
>                 Format: 10 - 10 bytes 
>                 10k - 10 KB 
>                 10m - 10 MB 
>                 1g - 1 GB&lt;/description&gt; 
>             &lt;param-name&gt;uploadMaxFileSize&lt;/param-name&gt; 
>             &lt;param-value&gt;100m&lt;/param-value&gt; 
>         &lt;/init-param&gt; 
>         &lt;init-param&gt; 
>             &lt;description&gt;Set the threshold size - files 
>                 below this limit are stored in memory, files above 
>                 this limit are stored on disk. 
> 
>                 Format: 10 - 10 bytes 
>                 10k - 10 KB 
>                 10m - 10 MB 
>                 1g - 1 GB&lt;/description&gt; 
>             &lt;param-name&gt;uploadThresholdSize&lt;/param-name&gt; 
>             &lt;param-value&gt;100k&lt;/param-value&gt; 
>         &lt;/init-param&gt; 
>     &lt;/filter&gt; 
> 
>     &lt;filter-mapping&gt; 
>         &lt;filter-name&gt;extensionsFilter&lt;/filter-name&gt; 
>         &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt; 
>     &lt;/filter-mapping&gt; 
>     &lt;filter-mapping&gt; 
>         &lt;filter-name&gt;extensionsFilter&lt;/filter-name&gt; 
>         &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt; 
>     &lt;/filter-mapping&gt; 
> 
>     &lt;!-- Listener, to allow Jetty serving MyFaces apps --&gt; 
>     &lt;listener&gt; 
>        
> &lt;listener-class&gt;org.apache.myfaces.webapp.StartupServletContextListener&lt;/listener-class&gt; 
>     &lt;/listener&gt; 
>     
>     
>     
> 
>     &lt;!-- Faces Servlet --&gt; 
>     &lt;servlet&gt; 
>         &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; 
>        
> &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt; 
>         &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; 
>     &lt;/servlet&gt; 
> 
> 
> 
> 
> &lt;servlet&gt; 
>     &lt;servlet-name&gt;tiles&lt;/servlet-name&gt; 
>    
> &lt;servlet-class&gt;org.apache.tiles.servlet.TilesServlet&lt;/servlet-class&gt; 
>     &lt;init-param&gt; 
>        
> &lt;param-name&gt;org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG&lt;/param-name&gt; 
>         &lt;param-value&gt;/WEB-INF/tiles-def.xml&lt;/param-value&gt; 
>     &lt;/init-param&gt; 
>     &lt;load-on-startup&gt;2&lt;/load-on-startup&gt; 
> &lt;/servlet&gt; 
>         
>     &lt;!-- Faces Servlet Mapping --&gt; 
>     &lt;servlet-mapping&gt; 
>         &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; 
>         &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt; 
>     &lt;/servlet-mapping&gt; 
> 
> 
> 
>         
>     &lt;!-- Welcome files --&gt; 
>     &lt;welcome-file-list&gt; 
>         &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; 
>         &lt;welcome-file&gt;index.html&lt;/welcome-file&gt; 
>     &lt;/welcome-file-list&gt; 
> 
> &lt;/web-app&gt; 
> 
> 
> Here is the faces-config 
> 
> &lt;faces-config&gt; 
>         &lt;application&gt; 
>    
> &lt;view-handler&gt;org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl&lt;/view-handler&gt; 
> &lt;/application&gt; 
> 
>         &lt;!-- managed beans of the simple hello world app --&gt; 
>         &lt;managed-bean&gt; 
>                
> &lt;managed-bean-name&gt;helloWorldBacking&lt;/managed-bean-name&gt; 
>                
> &lt;managed-bean-class&gt;org.apache.myfaces.blank.HelloWorldBacking&lt;/managed-bean-class&gt; 
>                
> &lt;managed-bean-scope&gt;request&lt;/managed-bean-scope&gt; 
>         &lt;/managed-bean&gt; 
>         
>         &lt;!-- navigation rules for helloWorld.jsp --&gt; 
>         &lt;navigation-rule&gt; 
>                 &lt;from-view-id&gt;/helloWorld.jsp&lt;/from-view-id&gt; 
>                 &lt;navigation-case&gt; 
>                         &lt;from-outcome&gt;success&lt;/from-outcome&gt; 
>                         &lt;to-view-id&gt;/page2.jsp&lt;/to-view-id&gt; 
>                 &lt;/navigation-case&gt; 
>         &lt;/navigation-rule&gt; 
>         
>         &lt;!-- navigation rules for page2.jsp --&gt; 
>         &lt;navigation-rule&gt; 
>                 &lt;from-view-id&gt;/page2.jsp&lt;/from-view-id&gt; 
>                 &lt;navigation-case&gt; 
>                         &lt;from-outcome&gt;back&lt;/from-outcome&gt; 
>                        
> &lt;to-view-id&gt;/helloWorld.jsp&lt;/to-view-id&gt; 
>                 &lt;/navigation-case&gt; 
>         &lt;/navigation-rule&gt; 
> &lt;/faces-config&gt; 
> 
> Here is the tiles-def 
> 
> &lt;!DOCTYPE tiles-definitions PUBLIC 
>        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" 
>        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd" &gt; 
> &lt;definition name="zargonsolutions.layout" 
>         template="/pages/template.jsp"&gt; 
>         &lt;put-attribute name="header" value="/pages/includes/header.jsp"
> /&gt; 
>         &lt;put-attribute name="footer" value="/pages/includes/footer.jsp"
> /&gt; 
>         &lt;put-attribute name="title" value="Welcome to Zargon Solutions"
> /&gt; 
> &lt;/definition&gt; 
> 
> &lt;definition name="/pages/home.tiles"
> extends="zargonsolutions.layout"&gt; 
>         &lt;put name="body" value="/pages/home.jsp" /&gt; 
>         &lt;put name="title" value="Zargon Solutions - Home Page" /&gt; 
> &lt;/definition&gt; 
> 
> 
> 
> 
>   
>       
>     
>     
> 
>     
>   
>   
>   
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Standalone-Tiles-with-myFaces---DefinitionsFactoryException-class-not-found-tf4685057.html#a13402501
Sent from the tiles users mailing list archive at Nabble.com.


Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by zargarf <fa...@gmail.com>.
No there's nothing referencing struts in the web.xml and I'm not using
anything struts oriented, just myfaces


Ray Clough-2 wrote:
> 
> Is your web.xml file referring to some struts artifact or Struts-Tiles 
> plugin?  I use standalone Tiles and MyFaces without problems (app also 
> uses Struts, Tomahawk, Trinidad).  Does your app otherwise use Struts, 
> and if so which version?  If you use struts, but not the Struts2-Tiles 
> plugin, you can should the plugin jar.
> - Ray Clough
> 
> 
> 
> zargarf wrote:
>> Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.
>> However, when I try to deploy the war file to Tomcat, I get a
>> java.lang.NoClassDefFoundError:
>> org.apache.struts.tiles.DefinitionsFactoryException (which surprises me
>> as
>> I'm using the jars for the standalone version of tiles). Do any of you
>> know
>> why it's looking for org.apache.struts.tiles.DefinitionsFactoryException
>> instead of org.apache.tiles.DefinitionsFactoryException? 
>>
>> Cheers 
>> Faisal 
>>
>> This is the stacktrace: 
>>
>> 24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext
>> listenerStart 
>> SEVERE: Exception sending context initialized event to listener instance
>> of
>> class org.apache.myfaces.webapp.StartupServletContextListener 
>> java.lang.NoClassDefFoundError:
>> org.apache.struts.tiles.DefinitionsFactoryException 
>>         at java.lang.J9VMInternals.verifyImpl(Native Method) 
>>         at java.lang.J9VMInternals.verify(J9VMInternals.java:59) 
>>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:120) 
>>         at sun.reflect.NativeConstructorAccess 
>>
>> orImpl.newInstance0(Native Method) 
>>         at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67) 
>>         at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
>>         at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:521) 
>>         at
>> org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779) 
>>         at
>> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699) 
>>         at
>> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230) 
>>         at
>> org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68) 
>>         at
>> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51) 
>>         at
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) 
>>         at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) 
>>         at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) 
>>         at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) 
>>         at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) 
>>         at
>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) 
>>         at
>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515) 
>>         at
>> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) 
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) 
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
>>         at java.lang.reflect.Method.invoke(Method.java:615) 
>>         at
>> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458) 
>>         at
>> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231) 
>>         at
>> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238) 
>>         at
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833) 
>>         at
>> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) 
>>         at
>> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394) 
>>         at
>> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635) 
>>         at
>> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) 
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
>>         at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
>>         at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
>>         at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>>         at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
>>         at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) 
>>         at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
>>         at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
>>         at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
>>         at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
>>         at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
>>         at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
>>         at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
>>         at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
>>         at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
>>         at java.lang.Thread.run(Thread.java:799) 
>>
>>
>> Below, you can find the .pom file, the web.xml and the faces-config. 
>>
>> Here is my application.pom file for maven<?xml version="1.0"
>> encoding="UTF-8"?> 
>>
>> <project xmlns="http://maven.apache.org/POM/4.0.0" 
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd"> 
>>     <modelVersion>4.0.0</modelVersion> 
>>     <groupId>com.zargonsolutions</groupId> 
>>     <artifactId>zargonsolutions_myfaces_webapp</artifactId> 
>>     <packaging>war</packaging> 
>>     <version>1.0-SNAPSHOT</version> 
>>     <name>A custom project using myfaces</name> 
>>     <url>http://www.myorganization.org</url> 
>>
>>     <build> 
>>         <finalName>zargonsolutions_myfaces_webapp</finalName> 
>>     </build> 
>>
>>     <!-- Profile to run jetty, so the tomcat jars are included in the
>> bundle. They are not included by default --> 
>>     <profiles> 
>>         <profile> 
>>             <id>jettyConfig</id> 
>>             <build> 
>>                 <plugins> 
>>                     <plugin> 
>>                         <groupId>org.mortbay.jetty</groupId> 
>>                         <artifactId>maven-jetty-plugin</artifactId> 
>>                         <configuration> 
>>                             <scanIntervalSeconds>10</scanIntervalSeconds> 
>>                         </configuration> 
>>                     </plugin> 
>>                 </plugins> 
>>             </build> 
>>
>>             <dependencies> 
>>                 <dependency> 
>>                     <groupId>javax.servlet</groupId> 
>>                     <artifactId>jsp-api</artifactId> 
>>                     <version>2.0</version> 
>>                     <scope>compile</scope> 
>>                 </dependency> 
>>                 <dependency> 
>>                     <groupId>tomcat</groupId> 
>>                     <artifactId>jasper-compiler</artifactId> 
>>                     <version>5.5.9</version> 
>>                     <scope>compile</scope> 
>>                 </dependency> 
>>                 <dependency> 
>>                     <groupId>tomcat</groupId> 
>>                     <artifactId>jasper-runtime</artifactId> 
>>                     <version>5.5.9</version> 
>>                     <scope>compile</scope> 
>>                 </dependency> 
>>                 <dependency> 
>>                     <groupId>tomcat</groupId> 
>>                     <artifactId>jasper-compiler-jdt</artifactId> 
>>                     <version>5.5.9</version> 
>>                     <scope>compile</scope> 
>>                 </dependency> 
>>             </dependencies> 
>>
>>             <pluginRepositories> 
>>                 <!-- Repository to get the jetty plugin --> 
>>                 <pluginRepository> 
>>                     <id>mortbay-repo</id> 
>>                     <name>mortbay-repo</name> 
>>                     <url>http://www.mortbay.org/maven2/snapshot</url> 
>>                 </pluginRepository> 
>>             </pluginRepositories> 
>>
>>         </profile> 
>>     </profiles> 
>>
>>     <repositories> 
>>         <repository> 
>>             <releases> 
>>                 <enabled>false</enabled> 
>>             </releases> 
>>             <snapshots> 
>>                 <enabled>true</enabled> 
>>             </snapshots> 
>>             <id>apache-maven-snapshots</id> 
>>            
>> <url>http://people.apache.org/repo/m2-snapshot-repository</url> 
>>         </repository> 
>>     </repositories> 
>>
>>     <!-- Project dependencies --> 
>>     <dependencies> 
>>         <dependency> 
>>             <groupId>org.apache.myfaces.core</groupId> 
>>             <artifactId>myfaces-api</artifactId> 
>>             <version>1.1.6-SNAPSHOT</version> 
>>             <scope>compile</scope> 
>>         </dependency> 
>>         
>>         <dependency> 
>>             <groupId>org.apache.myfaces.core</groupId> 
>>             <artifactId>myfaces-impl</artifactId> 
>>             <version>1.1.6-SNAPSHOT</version> 
>>             <scope>compile</scope> 
>>         </dependency> 
>>
>>         <dependency> 
>>             <groupId>myfaces</groupId> 
>>             <artifactId>tomahawk</artifactId> 
>>             <version>1.1.1</version> 
>>             <scope>compile</scope> 
>>         </dependency> 
>>
>>         <dependency> 
>>             <groupId>junit</groupId> 
>>             <artifactId>junit</artifactId> 
>>             <version>4.0</version> 
>>             <scope>test</scope> 
>>         </dependency> 
>>   <dependency> 
>>     <groupId>org.apache.tiles</groupId> 
>>     <artifactId>tiles-core</artifactId> 
>>     <version>2.0-SNAPSHOT</version> 
>>   </dependency> 
>>     <dependency> 
>>     <groupId>org.apache.tiles</groupId> 
>>     <artifactId>tiles-jsp</artifactId> 
>>     <version>2.0.4</version> 
>>   </dependency> 
>>   <dependency> 
>>     <groupId>org.apache.tiles</groupId> 
>>     <artifactId>tiles-api</artifactId> 
>>     <version>2.0.4</version> 
>>   </dependency> 
>>
>>     </dependencies> 
>>
>>
>> </project> 
>>
>> Here is the web.xml 
>>
>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" 
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
>>          version="2.4"> 
>>
>>     <description>MyProject web.xml</description> 
>>
>>     
>>         
>>     <context-param> 
>>         <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 
>>             Attention: You do not need to put /WEB-INF/faces-config.xml
>> in
>> here. 
>>         </description> 
>>         <param-name>javax.faces.CONFIG_FILES</param-name> 
>>         <param-value>/WEB-INF/faces-config.xml</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>State saving method: "client" or "server" (=
>> default) 
>>             See JSF Specification 2.5.3</description> 
>>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
>>         <param-value>client</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default). 
>>             Defines the amount (default = 20) of the latest views are
>> stored
>> in session.</description> 
>>        
>> <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name> 
>>         <param-value>20</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default). 
>>             If true (default) the state will be serialized to a byte
>> stream
>> before it 
>>             is written to the session. 
>>             If false the state will not be serialized to a byte
>> stream.</description> 
>>        
>> <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default) and if 
>>             org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
>> default) 
>>             If true (default) the serialized state will be compressed
>> before
>> it 
>>             is written to the session. If false the state will not be
>> compressed.</description> 
>>        
>> <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>This parameter tells MyFaces if javascript code
>> should
>> be allowed in the 
>>             rendered HTML output. 
>>             If javascript is allowed, command_link anchors will have
>> javascript code 
>>             that submits the corresponding form. 
>>             If javascript is not allowed, the state saving info and
>> nested
>> parameters 
>>             will be added as url parameters. 
>>             Default: "true"</description> 
>>         <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name> 
>>         <param-value>false</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>If true, rendered HTML code will be formatted, so
>> that
>> it is "human readable". 
>>             i.e. additional line separators and whitespace will be
>> written,
>> that do not 
>>             influence the HTML code. 
>>             Default: "true"</description> 
>>         <param-name>org.apache.myfaces.PRETTY_HTML</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>If true, a javascript function will be rendered that
>> is
>> able to restore the 
>>             former vertical scroll on every request. Convenient feature
>> if
>> you have pages 
>>             with long lists and you do not want the browser page to
>> always
>> jump to the top 
>>             if you trigger a link or button action that stays on the same
>> page. 
>>             Default: "false"</description> 
>>         <param-name>org.apache.myfaces.AUTO_SCROLL</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>
>>     <context-param> 
>>         <description>Used for encrypting view state. Only relevant for
>> client side 
>>             state saving. See MyFaces wiki/web site documentation for
>> instructions 
>>             on how to configure an application for diffenent encryption
>> strengths. 
>>         </description> 
>>         <param-name>org.apache.myfaces.SECRET</param-name> 
>>         <param-value>NzY1NDMyMTA=</param-value> 
>>     </context-param> 
>>
>>     <context-param> 
>>         <description> 
>>             Validate managed beans, navigation rules and ensure that
>> forms
>> are not nested. 
>>         </description> 
>>         <param-name>org.apache.myfaces.VALIDATE</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     
>>     <context-param> 
>>         <description> 
>>             Treat readonly same as if disabled attribute was set for
>> select
>> elements. 
>>         </description> 
>>        
>> <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param>     
>>     
>>     <context-param> 
>>         <description> 
>>             Use the defined class as the class which will be called when
>> a
>> resource is added to the 
>>             ExtensionFilter handling. Using StreamingAddResource here
>> helps
>> with performance. If you want to add 
>>             custom components and want to use the ExtensionFilter, you
>> need
>> to provide your custom implementation here. 
>>         </description> 
>>         <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> 
>>        
>> <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value> 
>>     </context-param>         
>>
>>     <context-param> 
>>         <description> 
>>             Virtual path in the URL which triggers loading of resources
>> for
>> the MyFaces extended components 
>>             in the ExtensionFilter. 
>>         </description> 
>>         <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name> 
>>         <param-value>/faces/myFacesExtensionResource</param-value> 
>>     </context-param> 
>>     
>>     <context-param> 
>>         <description> 
>>             Check if the extensions-filter has been properly configured. 
>>         </description> 
>>        
>> <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param>     
>>
>>     <context-param> 
>>         <description> 
>>             Define partial state saving as true/false. 
>>         </description> 
>>         <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name> 
>>         <param-value>false</param-value> 
>>     </context-param>     
>>
>>     <!-- Extensions Filter --> 
>>     <filter> 
>>         <filter-name>extensionsFilter</filter-name> 
>>        
>> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class> 
>>         <init-param> 
>>             <description>Set the size limit for uploaded files. 
>>                 Format: 10 - 10 bytes 
>>                 10k - 10 KB 
>>                 10m - 10 MB 
>>                 1g - 1 GB</description> 
>>             <param-name>uploadMaxFileSize</param-name> 
>>             <param-value>100m</param-value> 
>>         </init-param> 
>>         <init-param> 
>>             <description>Set the threshold size - files 
>>                 below this limit are stored in memory, files above 
>>                 this limit are stored on disk. 
>>
>>                 Format: 10 - 10 bytes 
>>                 10k - 10 KB 
>>                 10m - 10 MB 
>>                 1g - 1 GB</description> 
>>             <param-name>uploadThresholdSize</param-name> 
>>             <param-value>100k</param-value> 
>>         </init-param> 
>>     </filter> 
>>
>>     <filter-mapping> 
>>         <filter-name>extensionsFilter</filter-name> 
>>         <url-pattern>*.jsf</url-pattern> 
>>     </filter-mapping> 
>>     <filter-mapping> 
>>         <filter-name>extensionsFilter</filter-name> 
>>         <url-pattern>/faces/*</url-pattern> 
>>     </filter-mapping> 
>>
>>     <!-- Listener, to allow Jetty serving MyFaces apps --> 
>>     <listener> 
>>        
>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> 
>>     </listener> 
>>     
>>     
>>     
>>
>>     <!-- Faces Servlet --> 
>>     <servlet> 
>>         <servlet-name>Faces Servlet</servlet-name> 
>>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
>>         <load-on-startup>1</load-on-startup> 
>>     </servlet> 
>>
>>
>>
>>
>> <servlet> 
>>     <servlet-name>tiles</servlet-name> 
>>     <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class> 
>>     <init-param> 
>>        
>> <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name> 
>>         <param-value>/WEB-INF/tiles-def.xml</param-value> 
>>     </init-param> 
>>     <load-on-startup>2</load-on-startup> 
>> </servlet> 
>>         
>>     <!-- Faces Servlet Mapping --> 
>>     <servlet-mapping> 
>>         <servlet-name>Faces Servlet</servlet-name> 
>>         <url-pattern>*.jsf</url-pattern> 
>>     </servlet-mapping> 
>>
>>
>>
>>         
>>     <!-- Welcome files --> 
>>     <welcome-file-list> 
>>         <welcome-file>index.jsp</welcome-file> 
>>         <welcome-file>index.html</welcome-file> 
>>     </welcome-file-list> 
>>
>> </web-app> 
>>
>>
>> Here is the faces-config 
>>
>> <faces-config> 
>>         <application> 
>>    
>> <view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler> 
>> </application> 
>>
>>         <!-- managed beans of the simple hello world app --> 
>>         <managed-bean> 
>>                 <managed-bean-name>helloWorldBacking</managed-bean-name> 
>>                
>> <managed-bean-class>org.apache.myfaces.blank.HelloWorldBacking</managed-bean-class> 
>>                 <managed-bean-scope>request</managed-bean-scope> 
>>         </managed-bean> 
>>         
>>         <!-- navigation rules for helloWorld.jsp --> 
>>         <navigation-rule> 
>>                 <from-view-id>/helloWorld.jsp</from-view-id> 
>>                 <navigation-case> 
>>                         <from-outcome>success</from-outcome> 
>>                         <to-view-id>/page2.jsp</to-view-id> 
>>                 </navigation-case> 
>>         </navigation-rule> 
>>         
>>         <!-- navigation rules for page2.jsp --> 
>>         <navigation-rule> 
>>                 <from-view-id>/page2.jsp</from-view-id> 
>>                 <navigation-case> 
>>                         <from-outcome>back</from-outcome> 
>>                         <to-view-id>/helloWorld.jsp</to-view-id> 
>>                 </navigation-case> 
>>         </navigation-rule> 
>> </faces-config> 
>>
>> Here is the tiles-def 
>>
>> <!DOCTYPE tiles-definitions PUBLIC 
>>        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" 
>>        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"> 
>> <definition name="zargonsolutions.layout" 
>>         template="/pages/template.jsp"> 
>>         <put-attribute name="header" value="/pages/includes/header.jsp"
>> /> 
>>         <put-attribute name="footer" value="/pages/includes/footer.jsp"
>> /> 
>>         <put-attribute name="title" value="Welcome to Zargon Solutions"
>> /> 
>> </definition> 
>>
>> <definition name="/pages/home.tiles" extends="zargonsolutions.layout"> 
>>         <put name="body" value="/pages/home.jsp" /> 
>>         <put name="title" value="Zargon Solutions - Home Page" /> 
>> </definition> 
>>
>>
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Standalone-Tiles-with-myFaces---DefinitionsFactoryException-class-not-found-tf4685057.html#a13396007
Sent from the tiles users mailing list archive at Nabble.com.


Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by Ray Clough <rc...@kamakuraco.com>.
Is your web.xml file referring to some struts artifact or Struts-Tiles 
plugin?  I use standalone Tiles and MyFaces without problems (app also 
uses Struts, Tomahawk, Trinidad).  Does your app otherwise use Struts, 
and if so which version?  If you use struts, but not the Struts2-Tiles 
plugin, you can should the plugin jar.
- Ray Clough



zargarf wrote:
> Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.
> However, when I try to deploy the war file to Tomcat, I get a
> java.lang.NoClassDefFoundError:
> org.apache.struts.tiles.DefinitionsFactoryException (which surprises me as
> I'm using the jars for the standalone version of tiles). Do any of you know
> why it's looking for org.apache.struts.tiles.DefinitionsFactoryException
> instead of org.apache.tiles.DefinitionsFactoryException? 
>
> Cheers 
> Faisal 
>
> This is the stacktrace: 
>
> 24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext listenerStart 
> SEVERE: Exception sending context initialized event to listener instance of
> class org.apache.myfaces.webapp.StartupServletContextListener 
> java.lang.NoClassDefFoundError:
> org.apache.struts.tiles.DefinitionsFactoryException 
>         at java.lang.J9VMInternals.verifyImpl(Native Method) 
>         at java.lang.J9VMInternals.verify(J9VMInternals.java:59) 
>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:120) 
>         at sun.reflect.NativeConstructorAccess 
>
> orImpl.newInstance0(Native Method) 
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67) 
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:521) 
>         at
> org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779) 
>         at
> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699) 
>         at
> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230) 
>         at
> org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68) 
>         at
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51) 
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) 
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) 
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) 
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) 
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) 
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) 
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515) 
>         at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) 
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
>         at java.lang.reflect.Method.invoke(Method.java:615) 
>         at
> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458) 
>         at
> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231) 
>         at
> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238) 
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833) 
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) 
>         at
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394) 
>         at
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635) 
>         at
> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) 
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) 
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
>         at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
>         at java.lang.Thread.run(Thread.java:799) 
>
>
> Below, you can find the .pom file, the web.xml and the faces-config. 
>
> Here is my application.pom file for maven<?xml version="1.0"
> encoding="UTF-8"?> 
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" 
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd"> 
>     <modelVersion>4.0.0</modelVersion> 
>     <groupId>com.zargonsolutions</groupId> 
>     <artifactId>zargonsolutions_myfaces_webapp</artifactId> 
>     <packaging>war</packaging> 
>     <version>1.0-SNAPSHOT</version> 
>     <name>A custom project using myfaces</name> 
>     <url>http://www.myorganization.org</url> 
>
>     <build> 
>         <finalName>zargonsolutions_myfaces_webapp</finalName> 
>     </build> 
>
>     <!-- Profile to run jetty, so the tomcat jars are included in the
> bundle. They are not included by default --> 
>     <profiles> 
>         <profile> 
>             <id>jettyConfig</id> 
>             <build> 
>                 <plugins> 
>                     <plugin> 
>                         <groupId>org.mortbay.jetty</groupId> 
>                         <artifactId>maven-jetty-plugin</artifactId> 
>                         <configuration> 
>                             <scanIntervalSeconds>10</scanIntervalSeconds> 
>                         </configuration> 
>                     </plugin> 
>                 </plugins> 
>             </build> 
>
>             <dependencies> 
>                 <dependency> 
>                     <groupId>javax.servlet</groupId> 
>                     <artifactId>jsp-api</artifactId> 
>                     <version>2.0</version> 
>                     <scope>compile</scope> 
>                 </dependency> 
>                 <dependency> 
>                     <groupId>tomcat</groupId> 
>                     <artifactId>jasper-compiler</artifactId> 
>                     <version>5.5.9</version> 
>                     <scope>compile</scope> 
>                 </dependency> 
>                 <dependency> 
>                     <groupId>tomcat</groupId> 
>                     <artifactId>jasper-runtime</artifactId> 
>                     <version>5.5.9</version> 
>                     <scope>compile</scope> 
>                 </dependency> 
>                 <dependency> 
>                     <groupId>tomcat</groupId> 
>                     <artifactId>jasper-compiler-jdt</artifactId> 
>                     <version>5.5.9</version> 
>                     <scope>compile</scope> 
>                 </dependency> 
>             </dependencies> 
>
>             <pluginRepositories> 
>                 <!-- Repository to get the jetty plugin --> 
>                 <pluginRepository> 
>                     <id>mortbay-repo</id> 
>                     <name>mortbay-repo</name> 
>                     <url>http://www.mortbay.org/maven2/snapshot</url> 
>                 </pluginRepository> 
>             </pluginRepositories> 
>
>         </profile> 
>     </profiles> 
>
>     <repositories> 
>         <repository> 
>             <releases> 
>                 <enabled>false</enabled> 
>             </releases> 
>             <snapshots> 
>                 <enabled>true</enabled> 
>             </snapshots> 
>             <id>apache-maven-snapshots</id> 
>             <url>http://people.apache.org/repo/m2-snapshot-repository</url> 
>         </repository> 
>     </repositories> 
>
>     <!-- Project dependencies --> 
>     <dependencies> 
>         <dependency> 
>             <groupId>org.apache.myfaces.core</groupId> 
>             <artifactId>myfaces-api</artifactId> 
>             <version>1.1.6-SNAPSHOT</version> 
>             <scope>compile</scope> 
>         </dependency> 
>         
>         <dependency> 
>             <groupId>org.apache.myfaces.core</groupId> 
>             <artifactId>myfaces-impl</artifactId> 
>             <version>1.1.6-SNAPSHOT</version> 
>             <scope>compile</scope> 
>         </dependency> 
>
>         <dependency> 
>             <groupId>myfaces</groupId> 
>             <artifactId>tomahawk</artifactId> 
>             <version>1.1.1</version> 
>             <scope>compile</scope> 
>         </dependency> 
>
>         <dependency> 
>             <groupId>junit</groupId> 
>             <artifactId>junit</artifactId> 
>             <version>4.0</version> 
>             <scope>test</scope> 
>         </dependency> 
>   <dependency> 
>     <groupId>org.apache.tiles</groupId> 
>     <artifactId>tiles-core</artifactId> 
>     <version>2.0-SNAPSHOT</version> 
>   </dependency> 
>     <dependency> 
>     <groupId>org.apache.tiles</groupId> 
>     <artifactId>tiles-jsp</artifactId> 
>     <version>2.0.4</version> 
>   </dependency> 
>   <dependency> 
>     <groupId>org.apache.tiles</groupId> 
>     <artifactId>tiles-api</artifactId> 
>     <version>2.0.4</version> 
>   </dependency> 
>
>     </dependencies> 
>
>
> </project> 
>
> Here is the web.xml 
>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" 
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
>          version="2.4"> 
>
>     <description>MyProject web.xml</description> 
>
>     
>         
>     <context-param> 
>         <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 
>             Attention: You do not need to put /WEB-INF/faces-config.xml in
> here. 
>         </description> 
>         <param-name>javax.faces.CONFIG_FILES</param-name> 
>         <param-value>/WEB-INF/faces-config.xml</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>State saving method: "client" or "server" (= default) 
>             See JSF Specification 2.5.3</description> 
>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
>         <param-value>client</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>Only applicable if state saving method is "server" (=
> default). 
>             Defines the amount (default = 20) of the latest views are stored
> in session.</description> 
>        
> <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name> 
>         <param-value>20</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>Only applicable if state saving method is "server" (=
> default). 
>             If true (default) the state will be serialized to a byte stream
> before it 
>             is written to the session. 
>             If false the state will not be serialized to a byte
> stream.</description> 
>        
> <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>Only applicable if state saving method is "server" (=
> default) and if 
>             org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
> default) 
>             If true (default) the serialized state will be compressed before
> it 
>             is written to the session. If false the state will not be
> compressed.</description> 
>        
> <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>This parameter tells MyFaces if javascript code should
> be allowed in the 
>             rendered HTML output. 
>             If javascript is allowed, command_link anchors will have
> javascript code 
>             that submits the corresponding form. 
>             If javascript is not allowed, the state saving info and nested
> parameters 
>             will be added as url parameters. 
>             Default: "true"</description> 
>         <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     <context-param> 
>         <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name> 
>         <param-value>false</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>If true, rendered HTML code will be formatted, so that
> it is "human readable". 
>             i.e. additional line separators and whitespace will be written,
> that do not 
>             influence the HTML code. 
>             Default: "true"</description> 
>         <param-name>org.apache.myfaces.PRETTY_HTML</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>If true, a javascript function will be rendered that is
> able to restore the 
>             former vertical scroll on every request. Convenient feature if
> you have pages 
>             with long lists and you do not want the browser page to always
> jump to the top 
>             if you trigger a link or button action that stays on the same
> page. 
>             Default: "false"</description> 
>         <param-name>org.apache.myfaces.AUTO_SCROLL</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>
>     <context-param> 
>         <description>Used for encrypting view state. Only relevant for
> client side 
>             state saving. See MyFaces wiki/web site documentation for
> instructions 
>             on how to configure an application for diffenent encryption
> strengths. 
>         </description> 
>         <param-name>org.apache.myfaces.SECRET</param-name> 
>         <param-value>NzY1NDMyMTA=</param-value> 
>     </context-param> 
>
>     <context-param> 
>         <description> 
>             Validate managed beans, navigation rules and ensure that forms
> are not nested. 
>         </description> 
>         <param-name>org.apache.myfaces.VALIDATE</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     
>     <context-param> 
>         <description> 
>             Treat readonly same as if disabled attribute was set for select
> elements. 
>         </description> 
>        
> <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name> 
>         <param-value>true</param-value> 
>     </context-param>     
>     
>     <context-param> 
>         <description> 
>             Use the defined class as the class which will be called when a
> resource is added to the 
>             ExtensionFilter handling. Using StreamingAddResource here helps
> with performance. If you want to add 
>             custom components and want to use the ExtensionFilter, you need
> to provide your custom implementation here. 
>         </description> 
>         <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> 
>        
> <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value> 
>     </context-param>         
>
>     <context-param> 
>         <description> 
>             Virtual path in the URL which triggers loading of resources for
> the MyFaces extended components 
>             in the ExtensionFilter. 
>         </description> 
>         <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name> 
>         <param-value>/faces/myFacesExtensionResource</param-value> 
>     </context-param> 
>     
>     <context-param> 
>         <description> 
>             Check if the extensions-filter has been properly configured. 
>         </description> 
>         <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name> 
>         <param-value>true</param-value> 
>     </context-param>     
>
>     <context-param> 
>         <description> 
>             Define partial state saving as true/false. 
>         </description> 
>         <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name> 
>         <param-value>false</param-value> 
>     </context-param>     
>
>     <!-- Extensions Filter --> 
>     <filter> 
>         <filter-name>extensionsFilter</filter-name> 
>        
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class> 
>         <init-param> 
>             <description>Set the size limit for uploaded files. 
>                 Format: 10 - 10 bytes 
>                 10k - 10 KB 
>                 10m - 10 MB 
>                 1g - 1 GB</description> 
>             <param-name>uploadMaxFileSize</param-name> 
>             <param-value>100m</param-value> 
>         </init-param> 
>         <init-param> 
>             <description>Set the threshold size - files 
>                 below this limit are stored in memory, files above 
>                 this limit are stored on disk. 
>
>                 Format: 10 - 10 bytes 
>                 10k - 10 KB 
>                 10m - 10 MB 
>                 1g - 1 GB</description> 
>             <param-name>uploadThresholdSize</param-name> 
>             <param-value>100k</param-value> 
>         </init-param> 
>     </filter> 
>
>     <filter-mapping> 
>         <filter-name>extensionsFilter</filter-name> 
>         <url-pattern>*.jsf</url-pattern> 
>     </filter-mapping> 
>     <filter-mapping> 
>         <filter-name>extensionsFilter</filter-name> 
>         <url-pattern>/faces/*</url-pattern> 
>     </filter-mapping> 
>
>     <!-- Listener, to allow Jetty serving MyFaces apps --> 
>     <listener> 
>        
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> 
>     </listener> 
>     
>     
>     
>
>     <!-- Faces Servlet --> 
>     <servlet> 
>         <servlet-name>Faces Servlet</servlet-name> 
>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
>         <load-on-startup>1</load-on-startup> 
>     </servlet> 
>
>
>
>
> <servlet> 
>     <servlet-name>tiles</servlet-name> 
>     <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class> 
>     <init-param> 
>        
> <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name> 
>         <param-value>/WEB-INF/tiles-def.xml</param-value> 
>     </init-param> 
>     <load-on-startup>2</load-on-startup> 
> </servlet> 
>         
>     <!-- Faces Servlet Mapping --> 
>     <servlet-mapping> 
>         <servlet-name>Faces Servlet</servlet-name> 
>         <url-pattern>*.jsf</url-pattern> 
>     </servlet-mapping> 
>
>
>
>         
>     <!-- Welcome files --> 
>     <welcome-file-list> 
>         <welcome-file>index.jsp</welcome-file> 
>         <welcome-file>index.html</welcome-file> 
>     </welcome-file-list> 
>
> </web-app> 
>
>
> Here is the faces-config 
>
> <faces-config> 
>         <application> 
>    
> <view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler> 
> </application> 
>
>         <!-- managed beans of the simple hello world app --> 
>         <managed-bean> 
>                 <managed-bean-name>helloWorldBacking</managed-bean-name> 
>                
> <managed-bean-class>org.apache.myfaces.blank.HelloWorldBacking</managed-bean-class> 
>                 <managed-bean-scope>request</managed-bean-scope> 
>         </managed-bean> 
>         
>         <!-- navigation rules for helloWorld.jsp --> 
>         <navigation-rule> 
>                 <from-view-id>/helloWorld.jsp</from-view-id> 
>                 <navigation-case> 
>                         <from-outcome>success</from-outcome> 
>                         <to-view-id>/page2.jsp</to-view-id> 
>                 </navigation-case> 
>         </navigation-rule> 
>         
>         <!-- navigation rules for page2.jsp --> 
>         <navigation-rule> 
>                 <from-view-id>/page2.jsp</from-view-id> 
>                 <navigation-case> 
>                         <from-outcome>back</from-outcome> 
>                         <to-view-id>/helloWorld.jsp</to-view-id> 
>                 </navigation-case> 
>         </navigation-rule> 
> </faces-config> 
>
> Here is the tiles-def 
>
> <!DOCTYPE tiles-definitions PUBLIC 
>        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" 
>        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"> 
> <definition name="zargonsolutions.layout" 
>         template="/pages/template.jsp"> 
>         <put-attribute name="header" value="/pages/includes/header.jsp" /> 
>         <put-attribute name="footer" value="/pages/includes/footer.jsp" /> 
>         <put-attribute name="title" value="Welcome to Zargon Solutions" /> 
> </definition> 
>
> <definition name="/pages/home.tiles" extends="zargonsolutions.layout"> 
>         <put name="body" value="/pages/home.jsp" /> 
>         <put name="title" value="Zargon Solutions - Home Page" /> 
> </definition> 
>
>
>
>
>   


Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by zargarf <fa...@gmail.com>.
Thanks for your help...all resolved now



Antonio Petrelli-3 wrote:
> 
> 2007/10/24, zargarf <fa...@gmail.com>:
>>
>> Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.
> 
> Got it!
> JspTilesViewHandlerImpl depends on Struts-Tiles, not Tiles 2!
> See:
> http://svn.apache.org/repos/asf/myfaces/tomahawk/branches/1_1_6/core/src/main/java/org/apache/myfaces/tomahawk/application/jsp/JspTilesViewHandlerImpl.java
> So I wonder how other people are using Tiles with MyFaces then.
> 
> Antonio
> 
> 

-- 
View this message in context: http://www.nabble.com/Standalone-Tiles-with-myFaces---DefinitionsFactoryException-class-not-found-tf4685057.html#a13424940
Sent from the tiles users mailing list archive at Nabble.com.


Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/24, zargarf <fa...@gmail.com>:
>
> Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.

Got it!
JspTilesViewHandlerImpl depends on Struts-Tiles, not Tiles 2!
See:
http://svn.apache.org/repos/asf/myfaces/tomahawk/branches/1_1_6/core/src/main/java/org/apache/myfaces/tomahawk/application/jsp/JspTilesViewHandlerImpl.java
So I wonder how other people are using Tiles with MyFaces then.

Antonio

Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by zargarf <fa...@gmail.com>.
Thanks.....that worked. There's so much contradictory documentation
around....confusing as hell

Cheers though





Nicolas LE BAS wrote:
> 
> Hi,
> 
> Remove this from faces-config.xml (this is for Tiles 1) :
> 
> <application>  
> <view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler> 
> </application> 
> 
> Instead you will probably need to add something like this to web.xml :
> 
>     <context-param> 
>         <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
>         <param-value>.tiles</param-value> 
>     </context-param> 
> 
> And map TilesDispatchServlet on "*.tiles". Thus the JSF views will be
> routed through Tiles 2.
> 
> Hope this helps
> Nick
> 
> zargarf a écrit :
>> Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.
>> However, when I try to deploy the war file to Tomcat, I get a
>> java.lang.NoClassDefFoundError:
>> org.apache.struts.tiles.DefinitionsFactoryException (which surprises me
>> as
>> I'm using the jars for the standalone version of tiles). Do any of you
>> know
>> why it's looking for org.apache.struts.tiles.DefinitionsFactoryException
>> instead of org.apache.tiles.DefinitionsFactoryException? 
>>
>> Cheers 
>> Faisal 
>>
>> This is the stacktrace: 
>>
>> 24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext
>> listenerStart 
>> SEVERE: Exception sending context initialized event to listener instance
>> of
>> class org.apache.myfaces.webapp.StartupServletContextListener 
>> java.lang.NoClassDefFoundError:
>> org.apache.struts.tiles.DefinitionsFactoryException 
>>         at java.lang.J9VMInternals.verifyImpl(Native Method) 
>>         at java.lang.J9VMInternals.verify(J9VMInternals.java:59) 
>>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:120) 
>>         at sun.reflect.NativeConstructorAccess 
>>
>> orImpl.newInstance0(Native Method) 
>>         at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67) 
>>         at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
>>         at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:521) 
>>         at
>> org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779) 
>>         at
>> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699) 
>>         at
>> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230) 
>>         at
>> org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68) 
>>         at
>> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51) 
>>         at
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) 
>>         at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) 
>>         at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) 
>>         at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) 
>>         at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) 
>>         at
>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) 
>>         at
>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515) 
>>         at
>> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) 
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) 
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
>>         at java.lang.reflect.Method.invoke(Method.java:615) 
>>         at
>> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458) 
>>         at
>> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231) 
>>         at
>> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238) 
>>         at
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833) 
>>         at
>> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) 
>>         at
>> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394) 
>>         at
>> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635) 
>>         at
>> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) 
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
>>         at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
>>         at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
>>         at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>>         at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
>>         at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) 
>>         at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
>>         at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
>>         at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
>>         at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
>>         at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
>>         at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
>>         at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
>>         at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
>>         at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
>>         at java.lang.Thread.run(Thread.java:799) 
>>
>>
>> Below, you can find the .pom file, the web.xml and the faces-config. 
>>
>> Here is my application.pom file for maven<?xml version="1.0"
>> encoding="UTF-8"?> 
>>
>> <project xmlns="http://maven.apache.org/POM/4.0.0" 
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd"> 
>>     <modelVersion>4.0.0</modelVersion> 
>>     <groupId>com.zargonsolutions</groupId> 
>>     <artifactId>zargonsolutions_myfaces_webapp</artifactId> 
>>     <packaging>war</packaging> 
>>     <version>1.0-SNAPSHOT</version> 
>>     <name>A custom project using myfaces</name> 
>>     <url>http://www.myorganization.org</url> 
>>
>>     <build> 
>>         <finalName>zargonsolutions_myfaces_webapp</finalName> 
>>     </build> 
>>
>>     <!-- Profile to run jetty, so the tomcat jars are included in the
>> bundle. They are not included by default --> 
>>     <profiles> 
>>         <profile> 
>>             <id>jettyConfig</id> 
>>             <build> 
>>                 <plugins> 
>>                     <plugin> 
>>                         <groupId>org.mortbay.jetty</groupId> 
>>                         <artifactId>maven-jetty-plugin</artifactId> 
>>                         <configuration> 
>>                             <scanIntervalSeconds>10</scanIntervalSeconds> 
>>                         </configuration> 
>>                     </plugin> 
>>                 </plugins> 
>>             </build> 
>>
>>             <dependencies> 
>>                 <dependency> 
>>                     <groupId>javax.servlet</groupId> 
>>                     <artifactId>jsp-api</artifactId> 
>>                     <version>2.0</version> 
>>                     <scope>compile</scope> 
>>                 </dependency> 
>>                 <dependency> 
>>                     <groupId>tomcat</groupId> 
>>                     <artifactId>jasper-compiler</artifactId> 
>>                     <version>5.5.9</version> 
>>                     <scope>compile</scope> 
>>                 </dependency> 
>>                 <dependency> 
>>                     <groupId>tomcat</groupId> 
>>                     <artifactId>jasper-runtime</artifactId> 
>>                     <version>5.5.9</version> 
>>                     <scope>compile</scope> 
>>                 </dependency> 
>>                 <dependency> 
>>                     <groupId>tomcat</groupId> 
>>                     <artifactId>jasper-compiler-jdt</artifactId> 
>>                     <version>5.5.9</version> 
>>                     <scope>compile</scope> 
>>                 </dependency> 
>>             </dependencies> 
>>
>>             <pluginRepositories> 
>>                 <!-- Repository to get the jetty plugin --> 
>>                 <pluginRepository> 
>>                     <id>mortbay-repo</id> 
>>                     <name>mortbay-repo</name> 
>>                     <url>http://www.mortbay.org/maven2/snapshot</url> 
>>                 </pluginRepository> 
>>             </pluginRepositories> 
>>
>>         </profile> 
>>     </profiles> 
>>
>>     <repositories> 
>>         <repository> 
>>             <releases> 
>>                 <enabled>false</enabled> 
>>             </releases> 
>>             <snapshots> 
>>                 <enabled>true</enabled> 
>>             </snapshots> 
>>             <id>apache-maven-snapshots</id> 
>>            
>> <url>http://people.apache.org/repo/m2-snapshot-repository</url> 
>>         </repository> 
>>     </repositories> 
>>
>>     <!-- Project dependencies --> 
>>     <dependencies> 
>>         <dependency> 
>>             <groupId>org.apache.myfaces.core</groupId> 
>>             <artifactId>myfaces-api</artifactId> 
>>             <version>1.1.6-SNAPSHOT</version> 
>>             <scope>compile</scope> 
>>         </dependency> 
>>         
>>         <dependency> 
>>             <groupId>org.apache.myfaces.core</groupId> 
>>             <artifactId>myfaces-impl</artifactId> 
>>             <version>1.1.6-SNAPSHOT</version> 
>>             <scope>compile</scope> 
>>         </dependency> 
>>
>>         <dependency> 
>>             <groupId>myfaces</groupId> 
>>             <artifactId>tomahawk</artifactId> 
>>             <version>1.1.1</version> 
>>             <scope>compile</scope> 
>>         </dependency> 
>>
>>         <dependency> 
>>             <groupId>junit</groupId> 
>>             <artifactId>junit</artifactId> 
>>             <version>4.0</version> 
>>             <scope>test</scope> 
>>         </dependency> 
>>   <dependency> 
>>     <groupId>org.apache.tiles</groupId> 
>>     <artifactId>tiles-core</artifactId> 
>>     <version>2.0-SNAPSHOT</version> 
>>   </dependency> 
>>     <dependency> 
>>     <groupId>org.apache.tiles</groupId> 
>>     <artifactId>tiles-jsp</artifactId> 
>>     <version>2.0.4</version> 
>>   </dependency> 
>>   <dependency> 
>>     <groupId>org.apache.tiles</groupId> 
>>     <artifactId>tiles-api</artifactId> 
>>     <version>2.0.4</version> 
>>   </dependency> 
>>
>>     </dependencies> 
>>
>>
>> </project> 
>>
>> Here is the web.xml 
>>
>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" 
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
>>          version="2.4"> 
>>
>>     <description>MyProject web.xml</description> 
>>
>>     
>>         
>>     <context-param> 
>>         <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 
>>             Attention: You do not need to put /WEB-INF/faces-config.xml
>> in
>> here. 
>>         </description> 
>>         <param-name>javax.faces.CONFIG_FILES</param-name> 
>>         <param-value>/WEB-INF/faces-config.xml</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>State saving method: "client" or "server" (=
>> default) 
>>             See JSF Specification 2.5.3</description> 
>>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
>>         <param-value>client</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default). 
>>             Defines the amount (default = 20) of the latest views are
>> stored
>> in session.</description> 
>>        
>> <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name> 
>>         <param-value>20</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default). 
>>             If true (default) the state will be serialized to a byte
>> stream
>> before it 
>>             is written to the session. 
>>             If false the state will not be serialized to a byte
>> stream.</description> 
>>        
>> <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default) and if 
>>             org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
>> default) 
>>             If true (default) the serialized state will be compressed
>> before
>> it 
>>             is written to the session. If false the state will not be
>> compressed.</description> 
>>        
>> <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>This parameter tells MyFaces if javascript code
>> should
>> be allowed in the 
>>             rendered HTML output. 
>>             If javascript is allowed, command_link anchors will have
>> javascript code 
>>             that submits the corresponding form. 
>>             If javascript is not allowed, the state saving info and
>> nested
>> parameters 
>>             will be added as url parameters. 
>>             Default: "true"</description> 
>>         <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name> 
>>         <param-value>false</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>If true, rendered HTML code will be formatted, so
>> that
>> it is "human readable". 
>>             i.e. additional line separators and whitespace will be
>> written,
>> that do not 
>>             influence the HTML code. 
>>             Default: "true"</description> 
>>         <param-name>org.apache.myfaces.PRETTY_HTML</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     <context-param> 
>>         <description>If true, a javascript function will be rendered that
>> is
>> able to restore the 
>>             former vertical scroll on every request. Convenient feature
>> if
>> you have pages 
>>             with long lists and you do not want the browser page to
>> always
>> jump to the top 
>>             if you trigger a link or button action that stays on the same
>> page. 
>>             Default: "false"</description> 
>>         <param-name>org.apache.myfaces.AUTO_SCROLL</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>
>>     <context-param> 
>>         <description>Used for encrypting view state. Only relevant for
>> client side 
>>             state saving. See MyFaces wiki/web site documentation for
>> instructions 
>>             on how to configure an application for diffenent encryption
>> strengths. 
>>         </description> 
>>         <param-name>org.apache.myfaces.SECRET</param-name> 
>>         <param-value>NzY1NDMyMTA=</param-value> 
>>     </context-param> 
>>
>>     <context-param> 
>>         <description> 
>>             Validate managed beans, navigation rules and ensure that
>> forms
>> are not nested. 
>>         </description> 
>>         <param-name>org.apache.myfaces.VALIDATE</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param> 
>>     
>>     <context-param> 
>>         <description> 
>>             Treat readonly same as if disabled attribute was set for
>> select
>> elements. 
>>         </description> 
>>        
>> <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param>     
>>     
>>     <context-param> 
>>         <description> 
>>             Use the defined class as the class which will be called when
>> a
>> resource is added to the 
>>             ExtensionFilter handling. Using StreamingAddResource here
>> helps
>> with performance. If you want to add 
>>             custom components and want to use the ExtensionFilter, you
>> need
>> to provide your custom implementation here. 
>>         </description> 
>>         <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> 
>>        
>> <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value> 
>>     </context-param>         
>>
>>     <context-param> 
>>         <description> 
>>             Virtual path in the URL which triggers loading of resources
>> for
>> the MyFaces extended components 
>>             in the ExtensionFilter. 
>>         </description> 
>>         <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name> 
>>         <param-value>/faces/myFacesExtensionResource</param-value> 
>>     </context-param> 
>>     
>>     <context-param> 
>>         <description> 
>>             Check if the extensions-filter has been properly configured. 
>>         </description> 
>>        
>> <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name> 
>>         <param-value>true</param-value> 
>>     </context-param>     
>>
>>     <context-param> 
>>         <description> 
>>             Define partial state saving as true/false. 
>>         </description> 
>>         <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name> 
>>         <param-value>false</param-value> 
>>     </context-param>     
>>
>>     <!-- Extensions Filter --> 
>>     <filter> 
>>         <filter-name>extensionsFilter</filter-name> 
>>        
>> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class> 
>>         <init-param> 
>>             <description>Set the size limit for uploaded files. 
>>                 Format: 10 - 10 bytes 
>>                 10k - 10 KB 
>>                 10m - 10 MB 
>>                 1g - 1 GB</description> 
>>             <param-name>uploadMaxFileSize</param-name> 
>>             <param-value>100m</param-value> 
>>         </init-param> 
>>         <init-param> 
>>             <description>Set the threshold size - files 
>>                 below this limit are stored in memory, files above 
>>                 this limit are stored on disk. 
>>
>>                 Format: 10 - 10 bytes 
>>                 10k - 10 KB 
>>                 10m - 10 MB 
>>                 1g - 1 GB</description> 
>>             <param-name>uploadThresholdSize</param-name> 
>>             <param-value>100k</param-value> 
>>         </init-param> 
>>     </filter> 
>>
>>     <filter-mapping> 
>>         <filter-name>extensionsFilter</filter-name> 
>>         <url-pattern>*.jsf</url-pattern> 
>>     </filter-mapping> 
>>     <filter-mapping> 
>>         <filter-name>extensionsFilter</filter-name> 
>>         <url-pattern>/faces/*</url-pattern> 
>>     </filter-mapping> 
>>
>>     <!-- Listener, to allow Jetty serving MyFaces apps --> 
>>     <listener> 
>>        
>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> 
>>     </listener> 
>>     
>>     
>>     
>>
>>     <!-- Faces Servlet --> 
>>     <servlet> 
>>         <servlet-name>Faces Servlet</servlet-name> 
>>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
>>         <load-on-startup>1</load-on-startup> 
>>     </servlet> 
>>
>>
>>
>>
>> <servlet> 
>>     <servlet-name>tiles</servlet-name> 
>>     <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class> 
>>     <init-param> 
>>        
>> <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name> 
>>         <param-value>/WEB-INF/tiles-def.xml</param-value> 
>>     </init-param> 
>>     <load-on-startup>2</load-on-startup> 
>> </servlet> 
>>         
>>     <!-- Faces Servlet Mapping --> 
>>     <servlet-mapping> 
>>         <servlet-name>Faces Servlet</servlet-name> 
>>         <url-pattern>*.jsf</url-pattern> 
>>     </servlet-mapping> 
>>
>>
>>
>>         
>>     <!-- Welcome files --> 
>>     <welcome-file-list> 
>>         <welcome-file>index.jsp</welcome-file> 
>>         <welcome-file>index.html</welcome-file> 
>>     </welcome-file-list> 
>>
>> </web-app> 
>>
>>
>> Here is the faces-config 
>>
>> <faces-config> 
>>         <application> 
>>    
>> <view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler> 
>> </application> 
>>
>>         <!-- managed beans of the simple hello world app --> 
>>         <managed-bean> 
>>                 <managed-bean-name>helloWorldBacking</managed-bean-name> 
>>                
>> <managed-bean-class>org.apache.myfaces.blank.HelloWorldBacking</managed-bean-class> 
>>                 <managed-bean-scope>request</managed-bean-scope> 
>>         </managed-bean> 
>>         
>>         <!-- navigation rules for helloWorld.jsp --> 
>>         <navigation-rule> 
>>                 <from-view-id>/helloWorld.jsp</from-view-id> 
>>                 <navigation-case> 
>>                         <from-outcome>success</from-outcome> 
>>                         <to-view-id>/page2.jsp</to-view-id> 
>>                 </navigation-case> 
>>         </navigation-rule> 
>>         
>>         <!-- navigation rules for page2.jsp --> 
>>         <navigation-rule> 
>>                 <from-view-id>/page2.jsp</from-view-id> 
>>                 <navigation-case> 
>>                         <from-outcome>back</from-outcome> 
>>                         <to-view-id>/helloWorld.jsp</to-view-id> 
>>                 </navigation-case> 
>>         </navigation-rule> 
>> </faces-config> 
>>
>> Here is the tiles-def 
>>
>> <!DOCTYPE tiles-definitions PUBLIC 
>>        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" 
>>        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"> 
>> <definition name="zargonsolutions.layout" 
>>         template="/pages/template.jsp"> 
>>         <put-attribute name="header" value="/pages/includes/header.jsp"
>> /> 
>>         <put-attribute name="footer" value="/pages/includes/footer.jsp"
>> /> 
>>         <put-attribute name="title" value="Welcome to Zargon Solutions"
>> /> 
>> </definition> 
>>
>> <definition name="/pages/home.tiles" extends="zargonsolutions.layout"> 
>>         <put name="body" value="/pages/home.jsp" /> 
>>         <put name="title" value="Zargon Solutions - Home Page" /> 
>> </definition> 
>>
>>
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Standalone-Tiles-with-myFaces---DefinitionsFactoryException-class-not-found-tf4685057.html#a13424794
Sent from the tiles users mailing list archive at Nabble.com.


Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by Nicolas LE BAS <nl...@bigfoot.com>.
Hi,

Remove this from faces-config.xml (this is for Tiles 1) :

<application>  
<view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler> 
</application> 

Instead you will probably need to add something like this to web.xml :

    <context-param> 
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
        <param-value>.tiles</param-value> 
    </context-param> 

And map TilesDispatchServlet on "*.tiles". Thus the JSF views will be
routed through Tiles 2.

Hope this helps
Nick

zargarf a écrit :
> Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.
> However, when I try to deploy the war file to Tomcat, I get a
> java.lang.NoClassDefFoundError:
> org.apache.struts.tiles.DefinitionsFactoryException (which surprises me as
> I'm using the jars for the standalone version of tiles). Do any of you know
> why it's looking for org.apache.struts.tiles.DefinitionsFactoryException
> instead of org.apache.tiles.DefinitionsFactoryException? 
>
> Cheers 
> Faisal 
>
> This is the stacktrace: 
>
> 24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext listenerStart 
> SEVERE: Exception sending context initialized event to listener instance of
> class org.apache.myfaces.webapp.StartupServletContextListener 
> java.lang.NoClassDefFoundError:
> org.apache.struts.tiles.DefinitionsFactoryException 
>         at java.lang.J9VMInternals.verifyImpl(Native Method) 
>         at java.lang.J9VMInternals.verify(J9VMInternals.java:59) 
>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:120) 
>         at sun.reflect.NativeConstructorAccess 
>
> orImpl.newInstance0(Native Method) 
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67) 
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:521) 
>         at
> org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779) 
>         at
> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699) 
>         at
> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230) 
>         at
> org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68) 
>         at
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51) 
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) 
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) 
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) 
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) 
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) 
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) 
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515) 
>         at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) 
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) 
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
>         at java.lang.reflect.Method.invoke(Method.java:615) 
>         at
> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458) 
>         at
> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231) 
>         at
> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238) 
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833) 
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) 
>         at
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394) 
>         at
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635) 
>         at
> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) 
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) 
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) 
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) 
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) 
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
>         at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) 
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) 
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
>         at java.lang.Thread.run(Thread.java:799) 
>
>
> Below, you can find the .pom file, the web.xml and the faces-config. 
>
> Here is my application.pom file for maven<?xml version="1.0"
> encoding="UTF-8"?> 
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" 
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd"> 
>     <modelVersion>4.0.0</modelVersion> 
>     <groupId>com.zargonsolutions</groupId> 
>     <artifactId>zargonsolutions_myfaces_webapp</artifactId> 
>     <packaging>war</packaging> 
>     <version>1.0-SNAPSHOT</version> 
>     <name>A custom project using myfaces</name> 
>     <url>http://www.myorganization.org</url> 
>
>     <build> 
>         <finalName>zargonsolutions_myfaces_webapp</finalName> 
>     </build> 
>
>     <!-- Profile to run jetty, so the tomcat jars are included in the
> bundle. They are not included by default --> 
>     <profiles> 
>         <profile> 
>             <id>jettyConfig</id> 
>             <build> 
>                 <plugins> 
>                     <plugin> 
>                         <groupId>org.mortbay.jetty</groupId> 
>                         <artifactId>maven-jetty-plugin</artifactId> 
>                         <configuration> 
>                             <scanIntervalSeconds>10</scanIntervalSeconds> 
>                         </configuration> 
>                     </plugin> 
>                 </plugins> 
>             </build> 
>
>             <dependencies> 
>                 <dependency> 
>                     <groupId>javax.servlet</groupId> 
>                     <artifactId>jsp-api</artifactId> 
>                     <version>2.0</version> 
>                     <scope>compile</scope> 
>                 </dependency> 
>                 <dependency> 
>                     <groupId>tomcat</groupId> 
>                     <artifactId>jasper-compiler</artifactId> 
>                     <version>5.5.9</version> 
>                     <scope>compile</scope> 
>                 </dependency> 
>                 <dependency> 
>                     <groupId>tomcat</groupId> 
>                     <artifactId>jasper-runtime</artifactId> 
>                     <version>5.5.9</version> 
>                     <scope>compile</scope> 
>                 </dependency> 
>                 <dependency> 
>                     <groupId>tomcat</groupId> 
>                     <artifactId>jasper-compiler-jdt</artifactId> 
>                     <version>5.5.9</version> 
>                     <scope>compile</scope> 
>                 </dependency> 
>             </dependencies> 
>
>             <pluginRepositories> 
>                 <!-- Repository to get the jetty plugin --> 
>                 <pluginRepository> 
>                     <id>mortbay-repo</id> 
>                     <name>mortbay-repo</name> 
>                     <url>http://www.mortbay.org/maven2/snapshot</url> 
>                 </pluginRepository> 
>             </pluginRepositories> 
>
>         </profile> 
>     </profiles> 
>
>     <repositories> 
>         <repository> 
>             <releases> 
>                 <enabled>false</enabled> 
>             </releases> 
>             <snapshots> 
>                 <enabled>true</enabled> 
>             </snapshots> 
>             <id>apache-maven-snapshots</id> 
>             <url>http://people.apache.org/repo/m2-snapshot-repository</url> 
>         </repository> 
>     </repositories> 
>
>     <!-- Project dependencies --> 
>     <dependencies> 
>         <dependency> 
>             <groupId>org.apache.myfaces.core</groupId> 
>             <artifactId>myfaces-api</artifactId> 
>             <version>1.1.6-SNAPSHOT</version> 
>             <scope>compile</scope> 
>         </dependency> 
>         
>         <dependency> 
>             <groupId>org.apache.myfaces.core</groupId> 
>             <artifactId>myfaces-impl</artifactId> 
>             <version>1.1.6-SNAPSHOT</version> 
>             <scope>compile</scope> 
>         </dependency> 
>
>         <dependency> 
>             <groupId>myfaces</groupId> 
>             <artifactId>tomahawk</artifactId> 
>             <version>1.1.1</version> 
>             <scope>compile</scope> 
>         </dependency> 
>
>         <dependency> 
>             <groupId>junit</groupId> 
>             <artifactId>junit</artifactId> 
>             <version>4.0</version> 
>             <scope>test</scope> 
>         </dependency> 
>   <dependency> 
>     <groupId>org.apache.tiles</groupId> 
>     <artifactId>tiles-core</artifactId> 
>     <version>2.0-SNAPSHOT</version> 
>   </dependency> 
>     <dependency> 
>     <groupId>org.apache.tiles</groupId> 
>     <artifactId>tiles-jsp</artifactId> 
>     <version>2.0.4</version> 
>   </dependency> 
>   <dependency> 
>     <groupId>org.apache.tiles</groupId> 
>     <artifactId>tiles-api</artifactId> 
>     <version>2.0.4</version> 
>   </dependency> 
>
>     </dependencies> 
>
>
> </project> 
>
> Here is the web.xml 
>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" 
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
>          version="2.4"> 
>
>     <description>MyProject web.xml</description> 
>
>     
>         
>     <context-param> 
>         <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 
>             Attention: You do not need to put /WEB-INF/faces-config.xml in
> here. 
>         </description> 
>         <param-name>javax.faces.CONFIG_FILES</param-name> 
>         <param-value>/WEB-INF/faces-config.xml</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>State saving method: "client" or "server" (= default) 
>             See JSF Specification 2.5.3</description> 
>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
>         <param-value>client</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>Only applicable if state saving method is "server" (=
> default). 
>             Defines the amount (default = 20) of the latest views are stored
> in session.</description> 
>        
> <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name> 
>         <param-value>20</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>Only applicable if state saving method is "server" (=
> default). 
>             If true (default) the state will be serialized to a byte stream
> before it 
>             is written to the session. 
>             If false the state will not be serialized to a byte
> stream.</description> 
>        
> <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>Only applicable if state saving method is "server" (=
> default) and if 
>             org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
> default) 
>             If true (default) the serialized state will be compressed before
> it 
>             is written to the session. If false the state will not be
> compressed.</description> 
>        
> <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>This parameter tells MyFaces if javascript code should
> be allowed in the 
>             rendered HTML output. 
>             If javascript is allowed, command_link anchors will have
> javascript code 
>             that submits the corresponding form. 
>             If javascript is not allowed, the state saving info and nested
> parameters 
>             will be added as url parameters. 
>             Default: "true"</description> 
>         <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     <context-param> 
>         <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name> 
>         <param-value>false</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>If true, rendered HTML code will be formatted, so that
> it is "human readable". 
>             i.e. additional line separators and whitespace will be written,
> that do not 
>             influence the HTML code. 
>             Default: "true"</description> 
>         <param-name>org.apache.myfaces.PRETTY_HTML</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     <context-param> 
>         <description>If true, a javascript function will be rendered that is
> able to restore the 
>             former vertical scroll on every request. Convenient feature if
> you have pages 
>             with long lists and you do not want the browser page to always
> jump to the top 
>             if you trigger a link or button action that stays on the same
> page. 
>             Default: "false"</description> 
>         <param-name>org.apache.myfaces.AUTO_SCROLL</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>
>     <context-param> 
>         <description>Used for encrypting view state. Only relevant for
> client side 
>             state saving. See MyFaces wiki/web site documentation for
> instructions 
>             on how to configure an application for diffenent encryption
> strengths. 
>         </description> 
>         <param-name>org.apache.myfaces.SECRET</param-name> 
>         <param-value>NzY1NDMyMTA=</param-value> 
>     </context-param> 
>
>     <context-param> 
>         <description> 
>             Validate managed beans, navigation rules and ensure that forms
> are not nested. 
>         </description> 
>         <param-name>org.apache.myfaces.VALIDATE</param-name> 
>         <param-value>true</param-value> 
>     </context-param> 
>     
>     <context-param> 
>         <description> 
>             Treat readonly same as if disabled attribute was set for select
> elements. 
>         </description> 
>        
> <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name> 
>         <param-value>true</param-value> 
>     </context-param>     
>     
>     <context-param> 
>         <description> 
>             Use the defined class as the class which will be called when a
> resource is added to the 
>             ExtensionFilter handling. Using StreamingAddResource here helps
> with performance. If you want to add 
>             custom components and want to use the ExtensionFilter, you need
> to provide your custom implementation here. 
>         </description> 
>         <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name> 
>        
> <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value> 
>     </context-param>         
>
>     <context-param> 
>         <description> 
>             Virtual path in the URL which triggers loading of resources for
> the MyFaces extended components 
>             in the ExtensionFilter. 
>         </description> 
>         <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name> 
>         <param-value>/faces/myFacesExtensionResource</param-value> 
>     </context-param> 
>     
>     <context-param> 
>         <description> 
>             Check if the extensions-filter has been properly configured. 
>         </description> 
>         <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name> 
>         <param-value>true</param-value> 
>     </context-param>     
>
>     <context-param> 
>         <description> 
>             Define partial state saving as true/false. 
>         </description> 
>         <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name> 
>         <param-value>false</param-value> 
>     </context-param>     
>
>     <!-- Extensions Filter --> 
>     <filter> 
>         <filter-name>extensionsFilter</filter-name> 
>        
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class> 
>         <init-param> 
>             <description>Set the size limit for uploaded files. 
>                 Format: 10 - 10 bytes 
>                 10k - 10 KB 
>                 10m - 10 MB 
>                 1g - 1 GB</description> 
>             <param-name>uploadMaxFileSize</param-name> 
>             <param-value>100m</param-value> 
>         </init-param> 
>         <init-param> 
>             <description>Set the threshold size - files 
>                 below this limit are stored in memory, files above 
>                 this limit are stored on disk. 
>
>                 Format: 10 - 10 bytes 
>                 10k - 10 KB 
>                 10m - 10 MB 
>                 1g - 1 GB</description> 
>             <param-name>uploadThresholdSize</param-name> 
>             <param-value>100k</param-value> 
>         </init-param> 
>     </filter> 
>
>     <filter-mapping> 
>         <filter-name>extensionsFilter</filter-name> 
>         <url-pattern>*.jsf</url-pattern> 
>     </filter-mapping> 
>     <filter-mapping> 
>         <filter-name>extensionsFilter</filter-name> 
>         <url-pattern>/faces/*</url-pattern> 
>     </filter-mapping> 
>
>     <!-- Listener, to allow Jetty serving MyFaces apps --> 
>     <listener> 
>        
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> 
>     </listener> 
>     
>     
>     
>
>     <!-- Faces Servlet --> 
>     <servlet> 
>         <servlet-name>Faces Servlet</servlet-name> 
>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
>         <load-on-startup>1</load-on-startup> 
>     </servlet> 
>
>
>
>
> <servlet> 
>     <servlet-name>tiles</servlet-name> 
>     <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class> 
>     <init-param> 
>        
> <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name> 
>         <param-value>/WEB-INF/tiles-def.xml</param-value> 
>     </init-param> 
>     <load-on-startup>2</load-on-startup> 
> </servlet> 
>         
>     <!-- Faces Servlet Mapping --> 
>     <servlet-mapping> 
>         <servlet-name>Faces Servlet</servlet-name> 
>         <url-pattern>*.jsf</url-pattern> 
>     </servlet-mapping> 
>
>
>
>         
>     <!-- Welcome files --> 
>     <welcome-file-list> 
>         <welcome-file>index.jsp</welcome-file> 
>         <welcome-file>index.html</welcome-file> 
>     </welcome-file-list> 
>
> </web-app> 
>
>
> Here is the faces-config 
>
> <faces-config> 
>         <application> 
>    
> <view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler> 
> </application> 
>
>         <!-- managed beans of the simple hello world app --> 
>         <managed-bean> 
>                 <managed-bean-name>helloWorldBacking</managed-bean-name> 
>                
> <managed-bean-class>org.apache.myfaces.blank.HelloWorldBacking</managed-bean-class> 
>                 <managed-bean-scope>request</managed-bean-scope> 
>         </managed-bean> 
>         
>         <!-- navigation rules for helloWorld.jsp --> 
>         <navigation-rule> 
>                 <from-view-id>/helloWorld.jsp</from-view-id> 
>                 <navigation-case> 
>                         <from-outcome>success</from-outcome> 
>                         <to-view-id>/page2.jsp</to-view-id> 
>                 </navigation-case> 
>         </navigation-rule> 
>         
>         <!-- navigation rules for page2.jsp --> 
>         <navigation-rule> 
>                 <from-view-id>/page2.jsp</from-view-id> 
>                 <navigation-case> 
>                         <from-outcome>back</from-outcome> 
>                         <to-view-id>/helloWorld.jsp</to-view-id> 
>                 </navigation-case> 
>         </navigation-rule> 
> </faces-config> 
>
> Here is the tiles-def 
>
> <!DOCTYPE tiles-definitions PUBLIC 
>        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" 
>        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"> 
> <definition name="zargonsolutions.layout" 
>         template="/pages/template.jsp"> 
>         <put-attribute name="header" value="/pages/includes/header.jsp" /> 
>         <put-attribute name="footer" value="/pages/includes/footer.jsp" /> 
>         <put-attribute name="title" value="Welcome to Zargon Solutions" /> 
> </definition> 
>
> <definition name="/pages/home.tiles" extends="zargonsolutions.layout"> 
>         <put name="body" value="/pages/home.jsp" /> 
>         <put name="title" value="Zargon Solutions - Home Page" /> 
> </definition> 
>
>
>
>
>   


Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by zargarf <fa...@gmail.com>.
I still get the same error even after removing the other dependencies


Antonio Petrelli-3 wrote:
> 
> As I wrote in the previous email check your dependencies:
> you need to depend only on a version of Tiles (in your case 2.0.4).
> Leave only the dependency on tiles-jsp 2.0.4 and remove the rest of
> Tiles dependencies.
> If it does not work, post again your problem.
> 
> Antonio
> 
> 2007/10/24, zargarf <fa...@gmail.com>:
>>
>> Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.
>> However, when I try to deploy the war file to Tomcat, I get a
>> java.lang.NoClassDefFoundError:
>> org.apache.struts.tiles.DefinitionsFactoryException (which surprises me
>> as
>> I'm using the jars for the standalone version of tiles). Do any of you
>> know
>> why it's looking for org.apache.struts.tiles.DefinitionsFactoryException
>> instead of org.apache.tiles.DefinitionsFactoryException?
>>
>> Cheers
>> Faisal
>>
>> This is the stacktrace:
>>
>> 24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext
>> listenerStart
>> SEVERE: Exception sending context initialized event to listener instance
>> of
>> class org.apache.myfaces.webapp.StartupServletContextListener
>> java.lang.NoClassDefFoundError:
>> org.apache.struts.tiles.DefinitionsFactoryException
>>         at java.lang.J9VMInternals.verifyImpl(Native Method)
>>         at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
>>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
>>         at sun.reflect.NativeConstructorAccess
>>
>> orImpl.newInstance0(Native Method)
>>         at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
>>         at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>         at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>>         at
>> org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779)
>>         at
>> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699)
>>         at
>> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230)
>>         at
>> org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68)
>>         at
>> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51)
>>         at
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
>>         at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>>         at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
>>         at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
>>         at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
>>         at
>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
>>         at
>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
>>         at
>> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:615)
>>         at
>> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458)
>>         at
>> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
>>         at
>> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
>>         at
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
>>         at
>> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
>>         at
>> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394)
>>         at
>> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635)
>>         at
>> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>         at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>>         at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>         at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>         at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>>         at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
>>         at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>         at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>         at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>>         at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>>         at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>>         at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>>         at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>>         at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>>         at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>>         at java.lang.Thread.run(Thread.java:799)
>>
>>
>> Below, you can find the .pom file, the web.xml and the faces-config.
>>
>> Here is my application.pom file for maven<?xml version="1.0"
>> encoding="UTF-8"?>
>>
>> <project xmlns="http://maven.apache.org/POM/4.0.0"
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd">
>>     <modelVersion>4.0.0</modelVersion>
>>     <groupId>com.zargonsolutions</groupId>
>>     <artifactId>zargonsolutions_myfaces_webapp</artifactId>
>>     <packaging>war</packaging>
>>     <version>1.0-SNAPSHOT</version>
>>     <name>A custom project using myfaces</name>
>>     <url>http://www.myorganization.org</url>
>>
>>     <build>
>>         <finalName>zargonsolutions_myfaces_webapp</finalName>
>>     </build>
>>
>>     <!-- Profile to run jetty, so the tomcat jars are included in the
>> bundle. They are not included by default -->
>>     <profiles>
>>         <profile>
>>             <id>jettyConfig</id>
>>             <build>
>>                 <plugins>
>>                     <plugin>
>>                         <groupId>org.mortbay.jetty</groupId>
>>                         <artifactId>maven-jetty-plugin</artifactId>
>>                         <configuration>
>>                             <scanIntervalSeconds>10</scanIntervalSeconds>
>>                         </configuration>
>>                     </plugin>
>>                 </plugins>
>>             </build>
>>
>>             <dependencies>
>>                 <dependency>
>>                     <groupId>javax.servlet</groupId>
>>                     <artifactId>jsp-api</artifactId>
>>                     <version>2.0</version>
>>                     <scope>compile</scope>
>>                 </dependency>
>>                 <dependency>
>>                     <groupId>tomcat</groupId>
>>                     <artifactId>jasper-compiler</artifactId>
>>                     <version>5.5.9</version>
>>                     <scope>compile</scope>
>>                 </dependency>
>>                 <dependency>
>>                     <groupId>tomcat</groupId>
>>                     <artifactId>jasper-runtime</artifactId>
>>                     <version>5.5.9</version>
>>                     <scope>compile</scope>
>>                 </dependency>
>>                 <dependency>
>>                     <groupId>tomcat</groupId>
>>                     <artifactId>jasper-compiler-jdt</artifactId>
>>                     <version>5.5.9</version>
>>                     <scope>compile</scope>
>>                 </dependency>
>>             </dependencies>
>>
>>             <pluginRepositories>
>>                 <!-- Repository to get the jetty plugin -->
>>                 <pluginRepository>
>>                     <id>mortbay-repo</id>
>>                     <name>mortbay-repo</name>
>>                     <url>http://www.mortbay.org/maven2/snapshot</url>
>>                 </pluginRepository>
>>             </pluginRepositories>
>>
>>         </profile>
>>     </profiles>
>>
>>     <repositories>
>>         <repository>
>>             <releases>
>>                 <enabled>false</enabled>
>>             </releases>
>>             <snapshots>
>>                 <enabled>true</enabled>
>>             </snapshots>
>>             <id>apache-maven-snapshots</id>
>>            
>> <url>http://people.apache.org/repo/m2-snapshot-repository</url>
>>         </repository>
>>     </repositories>
>>
>>     <!-- Project dependencies -->
>>     <dependencies>
>>         <dependency>
>>             <groupId>org.apache.myfaces.core</groupId>
>>             <artifactId>myfaces-api</artifactId>
>>             <version>1.1.6-SNAPSHOT</version>
>>             <scope>compile</scope>
>>         </dependency>
>>
>>         <dependency>
>>             <groupId>org.apache.myfaces.core</groupId>
>>             <artifactId>myfaces-impl</artifactId>
>>             <version>1.1.6-SNAPSHOT</version>
>>             <scope>compile</scope>
>>         </dependency>
>>
>>         <dependency>
>>             <groupId>myfaces</groupId>
>>             <artifactId>tomahawk</artifactId>
>>             <version>1.1.1</version>
>>             <scope>compile</scope>
>>         </dependency>
>>
>>         <dependency>
>>             <groupId>junit</groupId>
>>             <artifactId>junit</artifactId>
>>             <version>4.0</version>
>>             <scope>test</scope>
>>         </dependency>
>>   <dependency>
>>     <groupId>org.apache.tiles</groupId>
>>     <artifactId>tiles-core</artifactId>
>>     <version>2.0-SNAPSHOT</version>
>>   </dependency>
>>     <dependency>
>>     <groupId>org.apache.tiles</groupId>
>>     <artifactId>tiles-jsp</artifactId>
>>     <version>2.0.4</version>
>>   </dependency>
>>   <dependency>
>>     <groupId>org.apache.tiles</groupId>
>>     <artifactId>tiles-api</artifactId>
>>     <version>2.0.4</version>
>>   </dependency>
>>
>>     </dependencies>
>>
>>
>> </project>
>>
>> Here is the web.xml
>>
>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>>          version="2.4">
>>
>>     <description>MyProject web.xml</description>
>>
>>
>>
>>     <context-param>
>>         <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
>>             Attention: You do not need to put /WEB-INF/faces-config.xml
>> in
>> here.
>>         </description>
>>         <param-name>javax.faces.CONFIG_FILES</param-name>
>>         <param-value>/WEB-INF/faces-config.xml</param-value>
>>     </context-param>
>>     <context-param>
>>         <description>State saving method: "client" or "server" (=
>> default)
>>             See JSF Specification 2.5.3</description>
>>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>>         <param-value>client</param-value>
>>     </context-param>
>>     <context-param>
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default).
>>             Defines the amount (default = 20) of the latest views are
>> stored
>> in session.</description>
>>
>> <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
>>         <param-value>20</param-value>
>>     </context-param>
>>     <context-param>
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default).
>>             If true (default) the state will be serialized to a byte
>> stream
>> before it
>>             is written to the session.
>>             If false the state will not be serialized to a byte
>> stream.</description>
>>
>> <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
>>         <param-value>true</param-value>
>>     </context-param>
>>     <context-param>
>>         <description>Only applicable if state saving method is "server"
>> (=
>> default) and if
>>             org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
>> default)
>>             If true (default) the serialized state will be compressed
>> before
>> it
>>             is written to the session. If false the state will not be
>> compressed.</description>
>>
>> <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
>>         <param-value>true</param-value>
>>     </context-param>
>>     <context-param>
>>         <description>This parameter tells MyFaces if javascript code
>> should
>> be allowed in the
>>             rendered HTML output.
>>             If javascript is allowed, command_link anchors will have
>> javascript code
>>             that submits the corresponding form.
>>             If javascript is not allowed, the state saving info and
>> nested
>> parameters
>>             will be added as url parameters.
>>             Default: "true"</description>
>>         <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
>>         <param-value>true</param-value>
>>     </context-param>
>>     <context-param>
>>         <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
>>         <param-value>false</param-value>
>>     </context-param>
>>     <context-param>
>>         <description>If true, rendered HTML code will be formatted, so
>> that
>> it is "human readable".
>>             i.e. additional line separators and whitespace will be
>> written,
>> that do not
>>             influence the HTML code.
>>             Default: "true"</description>
>>         <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
>>         <param-value>true</param-value>
>>     </context-param>
>>     <context-param>
>>         <description>If true, a javascript function will be rendered that
>> is
>> able to restore the
>>             former vertical scroll on every request. Convenient feature
>> if
>> you have pages
>>             with long lists and you do not want the browser page to
>> always
>> jump to the top
>>             if you trigger a link or button action that stays on the same
>> page.
>>             Default: "false"</description>
>>         <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
>>         <param-value>true</param-value>
>>     </context-param>
>>
>>     <context-param>
>>         <description>Used for encrypting view state. Only relevant for
>> client side
>>             state saving. See MyFaces wiki/web site documentation for
>> instructions
>>             on how to configure an application for diffenent encryption
>> strengths.
>>         </description>
>>         <param-name>org.apache.myfaces.SECRET</param-name>
>>         <param-value>NzY1NDMyMTA=</param-value>
>>     </context-param>
>>
>>     <context-param>
>>         <description>
>>             Validate managed beans, navigation rules and ensure that
>> forms
>> are not nested.
>>         </description>
>>         <param-name>org.apache.myfaces.VALIDATE</param-name>
>>         <param-value>true</param-value>
>>     </context-param>
>>
>>     <context-param>
>>         <description>
>>             Treat readonly same as if disabled attribute was set for
>> select
>> elements.
>>         </description>
>>
>> <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
>>         <param-value>true</param-value>
>>     </context-param>
>>
>>     <context-param>
>>         <description>
>>             Use the defined class as the class which will be called when
>> a
>> resource is added to the
>>             ExtensionFilter handling. Using StreamingAddResource here
>> helps
>> with performance. If you want to add
>>             custom components and want to use the ExtensionFilter, you
>> need
>> to provide your custom implementation here.
>>         </description>
>>         <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
>>
>> <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
>>     </context-param>
>>
>>     <context-param>
>>         <description>
>>             Virtual path in the URL which triggers loading of resources
>> for
>> the MyFaces extended components
>>             in the ExtensionFilter.
>>         </description>
>>         <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
>>         <param-value>/faces/myFacesExtensionResource</param-value>
>>     </context-param>
>>
>>     <context-param>
>>         <description>
>>             Check if the extensions-filter has been properly configured.
>>         </description>
>>        
>> <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
>>         <param-value>true</param-value>
>>     </context-param>
>>
>>     <context-param>
>>         <description>
>>             Define partial state saving as true/false.
>>         </description>
>>         <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
>>         <param-value>false</param-value>
>>     </context-param>
>>
>>     <!-- Extensions Filter -->
>>     <filter>
>>         <filter-name>extensionsFilter</filter-name>
>>
>> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>>         <init-param>
>>             <description>Set the size limit for uploaded files.
>>                 Format: 10 - 10 bytes
>>                 10k - 10 KB
>>                 10m - 10 MB
>>                 1g - 1 GB</description>
>>             <param-name>uploadMaxFileSize</param-name>
>>             <param-value>100m</param-value>
>>         </init-param>
>>         <init-param>
>>             <description>Set the threshold size - files
>>                 below this limit are stored in memory, files above
>>                 this limit are stored on disk.
>>
>>                 Format: 10 - 10 bytes
>>                 10k - 10 KB
>>                 10m - 10 MB
>>                 1g - 1 GB</description>
>>             <param-name>uploadThresholdSize</param-name>
>>             <param-value>100k</param-value>
>>         </init-param>
>>     </filter>
>>
>>     <filter-mapping>
>>         <filter-name>extensionsFilter</filter-name>
>>         <url-pattern>*.jsf</url-pattern>
>>     </filter-mapping>
>>     <filter-mapping>
>>         <filter-name>extensionsFilter</filter-name>
>>         <url-pattern>/faces/*</url-pattern>
>>     </filter-mapping>
>>
>>     <!-- Listener, to allow Jetty serving MyFaces apps -->
>>     <listener>
>>
>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>>     </listener>
>>
>>
>>
>>
>>     <!-- Faces Servlet -->
>>     <servlet>
>>         <servlet-name>Faces Servlet</servlet-name>
>>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>>         <load-on-startup>1</load-on-startup>
>>     </servlet>
>>
>>
>>
>>
>> <servlet>
>>     <servlet-name>tiles</servlet-name>
>>     <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
>>     <init-param>
>>
>> <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
>>         <param-value>/WEB-INF/tiles-def.xml</param-value>
>>     </init-param>
>>     <load-on-startup>2</load-on-startup>
>> </servlet>
>>
>>     <!-- Faces Servlet Mapping -->
>>     <servlet-mapping>
>>         <servlet-name>Faces Servlet</servlet-name>
>>         <url-pattern>*.jsf</url-pattern>
>>     </servlet-mapping>
>>
>>
>>
>>
>>     <!-- Welcome files -->
>>     <welcome-file-list>
>>         <welcome-file>index.jsp</welcome-file>
>>         <welcome-file>index.html</welcome-file>
>>     </welcome-file-list>
>>
>> </web-app>
>>
>>
>> Here is the faces-config
>>
>> <faces-config>
>>         <application>
>>
>> <view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler>
>> </application>
>>
>>         <!-- managed beans of the simple hello world app -->
>>         <managed-bean>
>>                 <managed-bean-name>helloWorldBacking</managed-bean-name>
>>
>> <managed-bean-class>org.apache.myfaces.blank.HelloWorldBacking</managed-bean-class>
>>                 <managed-bean-scope>request</managed-bean-scope>
>>         </managed-bean>
>>
>>         <!-- navigation rules for helloWorld.jsp -->
>>         <navigation-rule>
>>                 <from-view-id>/helloWorld.jsp</from-view-id>
>>                 <navigation-case>
>>                         <from-outcome>success</from-outcome>
>>                         <to-view-id>/page2.jsp</to-view-id>
>>                 </navigation-case>
>>         </navigation-rule>
>>
>>         <!-- navigation rules for page2.jsp -->
>>         <navigation-rule>
>>                 <from-view-id>/page2.jsp</from-view-id>
>>                 <navigation-case>
>>                         <from-outcome>back</from-outcome>
>>                         <to-view-id>/helloWorld.jsp</to-view-id>
>>                 </navigation-case>
>>         </navigation-rule>
>> </faces-config>
>>
>> Here is the tiles-def
>>
>> <!DOCTYPE tiles-definitions PUBLIC
>>        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
>>        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
>> <definition name="zargonsolutions.layout"
>>         template="/pages/template.jsp">
>>         <put-attribute name="header" value="/pages/includes/header.jsp"
>> />
>>         <put-attribute name="footer" value="/pages/includes/footer.jsp"
>> />
>>         <put-attribute name="title" value="Welcome to Zargon Solutions"
>> />
>> </definition>
>>
>> <definition name="/pages/home.tiles" extends="zargonsolutions.layout">
>>         <put name="body" value="/pages/home.jsp" />
>>         <put name="title" value="Zargon Solutions - Home Page" />
>> </definition>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Standalone-Tiles-with-myFaces---DefinitionsFactoryException-class-not-found-tf4685057.html#a13388265
>> Sent from the tiles users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Standalone-Tiles-with-myFaces---DefinitionsFactoryException-class-not-found-tf4685057.html#a13395976
Sent from the tiles users mailing list archive at Nabble.com.


Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found

Posted by Antonio Petrelli <an...@gmail.com>.
As I wrote in the previous email check your dependencies:
you need to depend only on a version of Tiles (in your case 2.0.4).
Leave only the dependency on tiles-jsp 2.0.4 and remove the rest of
Tiles dependencies.
If it does not work, post again your problem.

Antonio

2007/10/24, zargarf <fa...@gmail.com>:
>
> Hi, I'm trying to use myFaces and Standalone Tiles together using maven2.
> However, when I try to deploy the war file to Tomcat, I get a
> java.lang.NoClassDefFoundError:
> org.apache.struts.tiles.DefinitionsFactoryException (which surprises me as
> I'm using the jars for the standalone version of tiles). Do any of you know
> why it's looking for org.apache.struts.tiles.DefinitionsFactoryException
> instead of org.apache.tiles.DefinitionsFactoryException?
>
> Cheers
> Faisal
>
> This is the stacktrace:
>
> 24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext listenerStart
> SEVERE: Exception sending context initialized event to listener instance of
> class org.apache.myfaces.webapp.StartupServletContextListener
> java.lang.NoClassDefFoundError:
> org.apache.struts.tiles.DefinitionsFactoryException
>         at java.lang.J9VMInternals.verifyImpl(Native Method)
>         at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
>         at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
>         at sun.reflect.NativeConstructorAccess
>
> orImpl.newInstance0(Native Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
>         at
> org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779)
>         at
> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699)
>         at
> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230)
>         at
> org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68)
>         at
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
>         at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:615)
>         at
> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458)
>         at
> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
>         at
> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
>         at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
>         at
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394)
>         at
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635)
>         at
> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>         at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>         at java.lang.Thread.run(Thread.java:799)
>
>
> Below, you can find the .pom file, the web.xml and the faces-config.
>
> Here is my application.pom file for maven<?xml version="1.0"
> encoding="UTF-8"?>
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>com.zargonsolutions</groupId>
>     <artifactId>zargonsolutions_myfaces_webapp</artifactId>
>     <packaging>war</packaging>
>     <version>1.0-SNAPSHOT</version>
>     <name>A custom project using myfaces</name>
>     <url>http://www.myorganization.org</url>
>
>     <build>
>         <finalName>zargonsolutions_myfaces_webapp</finalName>
>     </build>
>
>     <!-- Profile to run jetty, so the tomcat jars are included in the
> bundle. They are not included by default -->
>     <profiles>
>         <profile>
>             <id>jettyConfig</id>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.mortbay.jetty</groupId>
>                         <artifactId>maven-jetty-plugin</artifactId>
>                         <configuration>
>                             <scanIntervalSeconds>10</scanIntervalSeconds>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>
>             <dependencies>
>                 <dependency>
>                     <groupId>javax.servlet</groupId>
>                     <artifactId>jsp-api</artifactId>
>                     <version>2.0</version>
>                     <scope>compile</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>tomcat</groupId>
>                     <artifactId>jasper-compiler</artifactId>
>                     <version>5.5.9</version>
>                     <scope>compile</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>tomcat</groupId>
>                     <artifactId>jasper-runtime</artifactId>
>                     <version>5.5.9</version>
>                     <scope>compile</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>tomcat</groupId>
>                     <artifactId>jasper-compiler-jdt</artifactId>
>                     <version>5.5.9</version>
>                     <scope>compile</scope>
>                 </dependency>
>             </dependencies>
>
>             <pluginRepositories>
>                 <!-- Repository to get the jetty plugin -->
>                 <pluginRepository>
>                     <id>mortbay-repo</id>
>                     <name>mortbay-repo</name>
>                     <url>http://www.mortbay.org/maven2/snapshot</url>
>                 </pluginRepository>
>             </pluginRepositories>
>
>         </profile>
>     </profiles>
>
>     <repositories>
>         <repository>
>             <releases>
>                 <enabled>false</enabled>
>             </releases>
>             <snapshots>
>                 <enabled>true</enabled>
>             </snapshots>
>             <id>apache-maven-snapshots</id>
>             <url>http://people.apache.org/repo/m2-snapshot-repository</url>
>         </repository>
>     </repositories>
>
>     <!-- Project dependencies -->
>     <dependencies>
>         <dependency>
>             <groupId>org.apache.myfaces.core</groupId>
>             <artifactId>myfaces-api</artifactId>
>             <version>1.1.6-SNAPSHOT</version>
>             <scope>compile</scope>
>         </dependency>
>
>         <dependency>
>             <groupId>org.apache.myfaces.core</groupId>
>             <artifactId>myfaces-impl</artifactId>
>             <version>1.1.6-SNAPSHOT</version>
>             <scope>compile</scope>
>         </dependency>
>
>         <dependency>
>             <groupId>myfaces</groupId>
>             <artifactId>tomahawk</artifactId>
>             <version>1.1.1</version>
>             <scope>compile</scope>
>         </dependency>
>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>             <version>4.0</version>
>             <scope>test</scope>
>         </dependency>
>   <dependency>
>     <groupId>org.apache.tiles</groupId>
>     <artifactId>tiles-core</artifactId>
>     <version>2.0-SNAPSHOT</version>
>   </dependency>
>     <dependency>
>     <groupId>org.apache.tiles</groupId>
>     <artifactId>tiles-jsp</artifactId>
>     <version>2.0.4</version>
>   </dependency>
>   <dependency>
>     <groupId>org.apache.tiles</groupId>
>     <artifactId>tiles-api</artifactId>
>     <version>2.0.4</version>
>   </dependency>
>
>     </dependencies>
>
>
> </project>
>
> Here is the web.xml
>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>          version="2.4">
>
>     <description>MyProject web.xml</description>
>
>
>
>     <context-param>
>         <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
>             Attention: You do not need to put /WEB-INF/faces-config.xml in
> here.
>         </description>
>         <param-name>javax.faces.CONFIG_FILES</param-name>
>         <param-value>/WEB-INF/faces-config.xml</param-value>
>     </context-param>
>     <context-param>
>         <description>State saving method: "client" or "server" (= default)
>             See JSF Specification 2.5.3</description>
>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>         <param-value>client</param-value>
>     </context-param>
>     <context-param>
>         <description>Only applicable if state saving method is "server" (=
> default).
>             Defines the amount (default = 20) of the latest views are stored
> in session.</description>
>
> <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
>         <param-value>20</param-value>
>     </context-param>
>     <context-param>
>         <description>Only applicable if state saving method is "server" (=
> default).
>             If true (default) the state will be serialized to a byte stream
> before it
>             is written to the session.
>             If false the state will not be serialized to a byte
> stream.</description>
>
> <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
>         <param-value>true</param-value>
>     </context-param>
>     <context-param>
>         <description>Only applicable if state saving method is "server" (=
> default) and if
>             org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
> default)
>             If true (default) the serialized state will be compressed before
> it
>             is written to the session. If false the state will not be
> compressed.</description>
>
> <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
>         <param-value>true</param-value>
>     </context-param>
>     <context-param>
>         <description>This parameter tells MyFaces if javascript code should
> be allowed in the
>             rendered HTML output.
>             If javascript is allowed, command_link anchors will have
> javascript code
>             that submits the corresponding form.
>             If javascript is not allowed, the state saving info and nested
> parameters
>             will be added as url parameters.
>             Default: "true"</description>
>         <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
>         <param-value>true</param-value>
>     </context-param>
>     <context-param>
>         <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
>         <param-value>false</param-value>
>     </context-param>
>     <context-param>
>         <description>If true, rendered HTML code will be formatted, so that
> it is "human readable".
>             i.e. additional line separators and whitespace will be written,
> that do not
>             influence the HTML code.
>             Default: "true"</description>
>         <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
>         <param-value>true</param-value>
>     </context-param>
>     <context-param>
>         <description>If true, a javascript function will be rendered that is
> able to restore the
>             former vertical scroll on every request. Convenient feature if
> you have pages
>             with long lists and you do not want the browser page to always
> jump to the top
>             if you trigger a link or button action that stays on the same
> page.
>             Default: "false"</description>
>         <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
>     <context-param>
>         <description>Used for encrypting view state. Only relevant for
> client side
>             state saving. See MyFaces wiki/web site documentation for
> instructions
>             on how to configure an application for diffenent encryption
> strengths.
>         </description>
>         <param-name>org.apache.myfaces.SECRET</param-name>
>         <param-value>NzY1NDMyMTA=</param-value>
>     </context-param>
>
>     <context-param>
>         <description>
>             Validate managed beans, navigation rules and ensure that forms
> are not nested.
>         </description>
>         <param-name>org.apache.myfaces.VALIDATE</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
>     <context-param>
>         <description>
>             Treat readonly same as if disabled attribute was set for select
> elements.
>         </description>
>
> <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
>     <context-param>
>         <description>
>             Use the defined class as the class which will be called when a
> resource is added to the
>             ExtensionFilter handling. Using StreamingAddResource here helps
> with performance. If you want to add
>             custom components and want to use the ExtensionFilter, you need
> to provide your custom implementation here.
>         </description>
>         <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
>
> <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
>     </context-param>
>
>     <context-param>
>         <description>
>             Virtual path in the URL which triggers loading of resources for
> the MyFaces extended components
>             in the ExtensionFilter.
>         </description>
>         <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
>         <param-value>/faces/myFacesExtensionResource</param-value>
>     </context-param>
>
>     <context-param>
>         <description>
>             Check if the extensions-filter has been properly configured.
>         </description>
>         <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
>     <context-param>
>         <description>
>             Define partial state saving as true/false.
>         </description>
>         <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
>         <param-value>false</param-value>
>     </context-param>
>
>     <!-- Extensions Filter -->
>     <filter>
>         <filter-name>extensionsFilter</filter-name>
>
> <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
>         <init-param>
>             <description>Set the size limit for uploaded files.
>                 Format: 10 - 10 bytes
>                 10k - 10 KB
>                 10m - 10 MB
>                 1g - 1 GB</description>
>             <param-name>uploadMaxFileSize</param-name>
>             <param-value>100m</param-value>
>         </init-param>
>         <init-param>
>             <description>Set the threshold size - files
>                 below this limit are stored in memory, files above
>                 this limit are stored on disk.
>
>                 Format: 10 - 10 bytes
>                 10k - 10 KB
>                 10m - 10 MB
>                 1g - 1 GB</description>
>             <param-name>uploadThresholdSize</param-name>
>             <param-value>100k</param-value>
>         </init-param>
>     </filter>
>
>     <filter-mapping>
>         <filter-name>extensionsFilter</filter-name>
>         <url-pattern>*.jsf</url-pattern>
>     </filter-mapping>
>     <filter-mapping>
>         <filter-name>extensionsFilter</filter-name>
>         <url-pattern>/faces/*</url-pattern>
>     </filter-mapping>
>
>     <!-- Listener, to allow Jetty serving MyFaces apps -->
>     <listener>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>     </listener>
>
>
>
>
>     <!-- Faces Servlet -->
>     <servlet>
>         <servlet-name>Faces Servlet</servlet-name>
>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>
>
>
>
> <servlet>
>     <servlet-name>tiles</servlet-name>
>     <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
>     <init-param>
>
> <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
>         <param-value>/WEB-INF/tiles-def.xml</param-value>
>     </init-param>
>     <load-on-startup>2</load-on-startup>
> </servlet>
>
>     <!-- Faces Servlet Mapping -->
>     <servlet-mapping>
>         <servlet-name>Faces Servlet</servlet-name>
>         <url-pattern>*.jsf</url-pattern>
>     </servlet-mapping>
>
>
>
>
>     <!-- Welcome files -->
>     <welcome-file-list>
>         <welcome-file>index.jsp</welcome-file>
>         <welcome-file>index.html</welcome-file>
>     </welcome-file-list>
>
> </web-app>
>
>
> Here is the faces-config
>
> <faces-config>
>         <application>
>
> <view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler>
> </application>
>
>         <!-- managed beans of the simple hello world app -->
>         <managed-bean>
>                 <managed-bean-name>helloWorldBacking</managed-bean-name>
>
> <managed-bean-class>org.apache.myfaces.blank.HelloWorldBacking</managed-bean-class>
>                 <managed-bean-scope>request</managed-bean-scope>
>         </managed-bean>
>
>         <!-- navigation rules for helloWorld.jsp -->
>         <navigation-rule>
>                 <from-view-id>/helloWorld.jsp</from-view-id>
>                 <navigation-case>
>                         <from-outcome>success</from-outcome>
>                         <to-view-id>/page2.jsp</to-view-id>
>                 </navigation-case>
>         </navigation-rule>
>
>         <!-- navigation rules for page2.jsp -->
>         <navigation-rule>
>                 <from-view-id>/page2.jsp</from-view-id>
>                 <navigation-case>
>                         <from-outcome>back</from-outcome>
>                         <to-view-id>/helloWorld.jsp</to-view-id>
>                 </navigation-case>
>         </navigation-rule>
> </faces-config>
>
> Here is the tiles-def
>
> <!DOCTYPE tiles-definitions PUBLIC
>        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
>        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
> <definition name="zargonsolutions.layout"
>         template="/pages/template.jsp">
>         <put-attribute name="header" value="/pages/includes/header.jsp" />
>         <put-attribute name="footer" value="/pages/includes/footer.jsp" />
>         <put-attribute name="title" value="Welcome to Zargon Solutions" />
> </definition>
>
> <definition name="/pages/home.tiles" extends="zargonsolutions.layout">
>         <put name="body" value="/pages/home.jsp" />
>         <put name="title" value="Zargon Solutions - Home Page" />
> </definition>
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Standalone-Tiles-with-myFaces---DefinitionsFactoryException-class-not-found-tf4685057.html#a13388265
> Sent from the tiles users mailing list archive at Nabble.com.
>
>