You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "R. Müller" <r....@unicomp-berlin.de> on 2006/07/03 10:07:12 UTC
Re: and JSF
Thank you for your reply Richard,
basically i followed you suggestion, i just putted the <f:subview> tag
into the file to include.
Nevertheless i took them away there, to put it into the main-page - the
same result!
here is my minimal test-case :
main-page :
<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/html4/transitional.dtd">
<html>
<f:view>
<head>
<title>TEST-Page</title>
</head>
<body>
<f:subview id="menu">
<jsp:include page="menu.jspf" />
<%-- static include works fine,
which is no different here.
<%@ include file="menu.jspf" %>
--%>
</f:subview>
</body>
</f:view>
</html>
menu-page (menu.jspf) :
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<t:outputText value="TEST"></t:outputText>
This test-case produces the same result (StackOverflow) for me with
MyFaces 1.1.3 .
Another idea is, that there is some missconfiguration in the
servlet-mappings for included files. Is the following web.xml-fragment
right ? Or do i have to send the jspf-files to the original JSP-servlet
without Faces? I just want to understand why there are some cycling
calls , which leads to this StackOverflow.
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jspf</url-pattern>
</servlet-mapping>
Thank you so far.
Regards
Ronald
Richard Capraro wrote:
> Hello Ronald,
> maybe you should surround your include with <f:subview>
> <f:subview>
> <jsp:include page="/fragments/menu/menu.jspf"/>
> </f:subview>
>
> i refers to
> http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFPage3.html
>
> Regards,
> Richard Capraro
>
>
> 2006/6/30, "R. Müller" <r....@unicomp-berlin.de>:
>> hi group,
>>
>> i run into troubles while trying to include some fragments into my pages
>> with <jsp:include>-tag.
>>
>>
>> <html>
>> <f:view>
>> <head>
>>
>> </head>
>> <body>
>> <jsp:include page="/fragments/menu/menu.jspf"/>
>> <h:form id="myform">
>> [...]
>> </h:form>
>> </body>
>> </f:view>
>> </html>
>>
>> where 'menu.jspf' is as follows :
>>
>> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
>> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
>>
>> <f:subview id="menu">
>>
>> <f:loadBundle basename="menu" var="menuitems" />
>> <t:jscookMenu id="mainMenu" layout="hbr" theme="ThemeOffice" >
>> [...]
>> </t:jscookMenu>
>> </f:subview>
>>
>> i'm quite sure, that it was working some time ago. It seems there runs a
>> neverending loop which leads to StackOverflow like you can see in the
>> error log.
>> The static include :
>>
>> <%@ include file="/fragments/menu/menu.jspf" %>
>>
>> works fine.
>> There is an article from Kito Mann :
>>
>> http://www.javaworld.com/javaworld/jw-12-2004/jw-1213-jsf_p.html
>>
>> which pointed out, that the dynamic include should work as well.
>>
>> I'm migrated from 1.1.1 to myfaces 1.1.3.
>>
>> <errorlog>
>> at
>> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
>>
>> at
>> org.apache.jsp.project.main_jsp._jspx_meth_f_view_0(main_jsp.java:149)
>> at org.apache.jsp.project.main_jsp._jspService(main_jsp.java:95)
>> at
>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>> at
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
>>
>> at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>> Caused by: javax.faces.FacesException: java.lang.StackOverflowError
>> ... 1024 more
>>
>> [ ... again and again ....]
>>
>> Caused by: javax.faces.FacesException: java.lang.StackOverflowError
>> ... 1024 more
>> Caused by: javax.faces.FacesException: java.lang.StackOverflowError
>>
>> </errorlog>
>>
>> regards
>>
>> ronald
>>
>>
>
--
*********************************************************
*M-Unicomp GmbH
*
*Dipl.-Ing. Ronald Müller
*Softwareentwicklung
*
*Plauener Straße 163-165, Haus 11
*13053 Berlin
*
*fon : +49 ( 0 ) 30 / 98 69 61 54
*mobil : +49 ( 0 ) 172 / 93 95 00 4
*fax : +49 ( 0 ) 30 / 98 69 61 55
*email : r.mueller@unicomp-berlin.de
*web : www.unicomp-berlin.de
********************************************************