tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Clough <rcclo...@kamakuraco.com>
Subject Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found
Date Wed, 24 Oct 2007 22:31:40 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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.<br>
<br>
&nbsp;&nbsp;&nbsp; &lt;!-- Define Tiles config files --&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;context-param&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param-name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/param-name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param-value&gt;<br>
&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;
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/param-value&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/context-param&gt;<br>
...<br>
&nbsp;&nbsp;&nbsp; &lt;listener&gt;<br>
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;listener-class&gt;<br>
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
org.apache.tiles.web.startup.TilesListener<br>
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/listener-class&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/listener&gt;<br>
...<br>
&nbsp;&nbsp;&nbsp; &lt;!-- Tiles-2 Dispatch Servlet --&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;servlet&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;Tiles
Dispatch Servlet&lt;/servlet-name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;servlet-class&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
org.apache.tiles.web.util.TilesDispatchServlet<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/servlet-class&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/servlet&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;servlet-mapping&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;Tiles
Dispatch Servlet&lt;/servlet-name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;url-pattern&gt;*.tiles&lt;/url-pattern&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/servlet-mapping&gt;<br>
<br>
<br>
zargarf wrote:
<blockquote cite="mid:13396007.post@talk.nabble.com" type="cite">
  <pre wrap="">No there's nothing referencing struts in the web.xml and I'm not using
anything struts oriented, just myfaces


Ray Clough-2 wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">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:
    </pre>
    <blockquote type="cite">
      <pre wrap="">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=<a class="moz-txt-link-rfc2396E" href="http://maven.apache.org/POM/4.0.0">"http://maven.apache.org/POM/4.0.0"</a>

         xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>

         xsi:schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd">"http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"</a>&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;<a class="moz-txt-link-freetext" href="http://www.myorganization.org">http://www.myorganization.org</a>&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;<a class="moz-txt-link-freetext" href="http://www.mortbay.org/maven2/snapshot">http://www.mortbay.org/maven2/snapshot</a>&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;<a class="moz-txt-link-freetext" href="http://people.apache.org/repo/m2-snapshot-repository">http://people.apache.org/repo/m2-snapshot-repository</a>&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=<a class="moz-txt-link-rfc2396E" href="http://java.sun.com/xml/ns/j2ee">"http://java.sun.com/xml/ns/j2ee"</a>

         xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>

         xsi:schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">"http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"</a> 
         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" 
       <a class="moz-txt-link-rfc2396E" href="http://tiles.apache.org/dtds/tiles-config_2_0.dtd">"http://tiles.apache.org/dtds/tiles-config_2_0.dtd"</a>&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; 




  
      </pre>
    </blockquote>
    <pre wrap="">

    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message