Actually, Antonio's last message caused the light to go on and I saw that I was not causing the extended tile def to load and consequently the primary tile def it is derived from to load, so clearly I could not possibly expect the tiles code to find anything wrapped by either def. I have since rearranged things to fix this glaring error.
At this point I am getting an illegal state exception within the
siteLayout.jsp compiled code as follows:
[#|2006-10-11T21:51:38.056-0400|INFO|sun-appserver-pe9.1|javax.enterprise.system.tools.deployment|
_ThreadID=11;_ThreadName=Timer-4;|[AutoDeploy] Successfully autodeployed
:
/home/gsl/java/glassfish/glassfish_v2_b20/domains/domain1/autodeploy/tilestest3.war.|#]
[#|2006-10-11T21:51:56.190-0400|WARNING|sun-appserver-pe9.1|javax.enterprise.resource.webcontainer.jsf.taglib|
_ThreadID=12;_ThreadName=httpWorkerThread-8080-1;_RequestID=b9de8883-434e-4aac-b919-73480e7c1a4b;|Can't
leverage base class
java.lang.IllegalStateException
at
com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:259)
at
javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:219)
at
javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:458)
at
javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:639)
at
javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1063)
at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:180)
at
org.apache.jsp.tiles.layouts.siteLayout_jsp._jspx_meth_f_view_0(Unknown
Source)
at org.apache.jsp.tiles.layouts.siteLayout_jsp._jspService(Unknown
Source)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
...
There is also a stack trace as follows:
[#|2006-10-11T22:04:25.762-0400|WARNING|sun-appserver-pe9.1|javax.enterprise.resource.webcontainer.jsf.lifecycl
e|_ThreadID=13;_ThreadName=httpWorkerThread-8080-0;_RequestID=e36b4132-d384-4a19-a02d-0ca2563784ed;|executePhas
e(RENDER_RESPONSE 6,[EMAIL PROTECTED]) threw
exception
javax.faces.FacesException: javax.servlet.ServletException: Exception in
'/tiles/layouts/siteLayout.jsp': null
at
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:418)
at
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:410)
at
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:112)
at
org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:175)
...
Here is how I have changed things and there is now an intermediate
page---loadLayout.jsp---to cause the extended tile
def---/contentPage---and consequently the tile it is derived
from---/mainLayout---to be loaded.
/index.jsp (the web.xml welcome file):
<jsp:forward page="/tiles/layouts/loadLayout.faces"/>
/tiles-defs.xml:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://struts.apache.org/dtds/tiles-config_2_0.dtd">
<tiles-definitions>
<!-- Display Definitions -->
<definition name="/mainLayout" path="/tiles/layouts/siteLayout.jsp">
<put name="htmlHeader" type="template"
value="/tiles/htmlHeaderTile.jsp"/>
</definition>
<definition name="/contentPage" extends="/mainLayout">
<put name="content" type="template" value="/tiles/homeTile.jsp"/>
</definition>
</tiles-definitions>
/tiles/layouts/loadLayout.jsp:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<html lang="en">
<f:view>
<!-- f:subview id="id1" --><tiles:insert name="/contentPage"
flush="false" type="definition"/><!-- /f:subview -->
</f:view>
</html>
/tiles/htmlHeaderTile.jsp:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<meta name="keywords" content="keyword1 keyword2">
<title><h:outputText value="Some title text."/></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
/tiles/homeTile.jsp:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<h1 align="center">Content Tile!</h1>
<div>
<p>
A paragraph of content.
<p>
A second paragraph of content.
<p>
A third paragraph of content.
</div>
/tiles/layouts/siteLayout.jsp:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<html lang="en">
<f:view>
<head>
<base href="http://localhost:8080/tilestest3">
<title><h:outputText value="This is a title."/></title>
<!-- f:subview id="id1" --><tiles:insert name="htmlHeader"
flush="false"/><!-- /f:subview -->
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
style="margin:0;padding:0">
<!-- Header and Menu -->
<!-- f:subview id="id1" --><tiles:insert name="content"
flush="false"/><!-- /f:subview -->
<h:outputText value="this is some text."/>
<h:inputText/>
</body>
</f:view>
</html>
A, hopefully pertinent, snippet of the siteLayout.jsp generated code
follows:
...
private boolean _jspx_meth_f_view_0(PageContext _jspx_page_context)
throws Throwable {
PageContext pageContext = _jspx_page_context;
JspWriter out = _jspx_page_context.getOut();
// f:view
com.sun.faces.taglib.jsf_core.ViewTag _jspx_th_f_view_0 =
(com.sun.faces.taglib.jsf_core.ViewTag)
_jspx_tagPool_f_view.get(com.sun.faces.taglib.jsf_core.ViewTag.class);
_jspx_th_f_view_0.setPageContext(_jspx_page_context);
_jspx_th_f_view_0.setParent(null);
_jspx_th_f_view_0.setJspId("id6");
int _jspx_eval_f_view_0 = _jspx_th_f_view_0.doStartTag();
<======================================= gsl
if (_jspx_eval_f_view_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
if (_jspx_eval_f_view_0 !=
javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
out = _jspx_page_context.pushBody();
_jspx_th_f_view_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent)
out);
_jspx_th_f_view_0.doInitBody();
}
do {
out.write("\n");
out.write("\t<head>\n");
...
From what I can see from the generated code, the
_jspx_th_f_view_0.doStartTag() corresponds to the first stack trace record:
at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:180)
and failure occurs because for some reason I am not providing something
that com.sun.faces.taglib.jsf_core.ViewTag.getComponentType needs or I
am causing illegal access to a thread through something that I am doing
or not doing.
I have tried both wrapping and not wrapping the tiles inserts with subviews.
Any ideas as to what I have done wrong now?
-=> Gregg <=-
signature.asc
Description: OpenPGP digital signature
