myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From logancillo <alons...@gmail.com>
Subject about jsf and tiles
Date Tue, 09 Oct 2007 09:23:41 GMT

Good days , 
i`m using myfaces 1.1.4 with spring and tiles.

the following exception is happening:


javax.faces.FacesException
at
de.mindmatters.faces.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:53)
at
de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java:37)
at
de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:166)
at
de.mindmatters.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:226)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:406)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: java.lang.NullPointerException
at
org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:168)
at
org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
at
org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)
at
de.mindmatters.faces.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:45)
... 21 more

my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" 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">

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
<description>
Set this flag to true if you want the JSF
Reference Implementation to verify that all of the application
objects you have configured (components, converters,
renderers, and validators) can be successfully created.
Default value is false.
Poner a false cuando se ponga en produccion.
</description>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
<description>
Set this flag to true if you want the JSF
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.
Poner a false cuando se ponga en produccion.
</description>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
<description>
Indica donde queremos guardar el estado de la aplicacion.
Poner a server cuando se ponga en produccion. antes probarlo!
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
<description>
Este parametro le dice a MyFaces si se va a permitir renderizar javascript.
Default: "true"
</description>
</context-param>
<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
<description>
si es verdadero, el renderizado html estara formateado, permitiendo que se
pueda leer
bien. En la fase de desarrollo, estara a true, cuando este en produccion,
estara a false.
</description>
</context-param>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>

<!-- listener de spring-->
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Tiles configuration
definition files and a listener need to be defined.
the listener will initialize JspTilesViewHandlerImpl with tiles definitions.
-->
<servlet>
<servlet-name>TilesServet</servlet-name>
<servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
</filter>
</web-app>

tiles-defs.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">

<tiles-definitions>

<definition name="Base" path="/paginas/plantillaBasica.jsp">
<put name="titulo" value="Base" type="string"/>
<put name="cabecera" value="/cabecera.jsp" type="page"/>
<put name="cuerpo" value="base" type="page"/>
<put name="pie" value="base" type="page"/>
</definition>

<definition name="/busquedaDosCajas.tiles" extends="Base">
<put name="titulo" value="Busqueda con dos cajas" type="string"/>
<put name="cuerpo" value="/paginas/cuerpoDosCajas.jsp" type="page"/>
</definition>

</tiles-definitions>

faces-config.xml

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<!-- =========== FULL CONFIGURATION FILE ==================================
-->

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

<!-- El mantenimiento del bean proxy se delega al contenedor de spring-->
<application>
<variable-resolver>
org.springframework.web.jsf.DelegatingVariableResolver
</variable-resolver>
</application>

<!-- el unico idioma permitido es el espaƱol.-->
<application>
<locale-config>
<default-locale>es</default-locale>
</locale-config>
</application>

<!--
- navigation rules
-->
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>succesNoJS</from-outcome>
<to-view-id>/paginas/listado.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>error</from-outcome>
<to-view-id>error.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

index.jsp

<%
response.sendRedirect("busquedaDosCajas.jsf");
%>

busquedaDosCajas is defined in tiles-defs.xml, it`s created by
org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.

i think that`s the problem, but im not sure

anybody could help me?

regards a lot 
-- 
View this message in context: http://www.nabble.com/about-jsf-and-tiles-tf4593035.html#a13112179
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message