Hi Brian/Antonio,

Thanks to both of you for responding . . .

Brian, I think now would be a good time to "revisit" my logging . . .
to make sure that it is being written properly.  I strongly suspect
that once the logging is working correctly I'll be able to overcome
issues myself . . . . .  and won't have to bother you and Antonio . .
. but to answer your questions:




Here is template.jsp:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%...@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles"; prefix="tiles" %>

<html>
<head>
        <title>test</title>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title><tiles:getAsString name="title"/></title>
        <title>THREE-COLUMN FIXED LAYOUT WITH FIXED BOXES</title>
        <link rel="stylesheet" href="../styles/style.css" type="text/css">
        <link rel="stylesheet" href="../styles/banner.css" type="text/css">
</head>
<body>
<div id="MainContainer">
<table border="1" cellpadding="2" cellspacing="2" align="center">
<tr>
<td height="20%" colspan="2" width="83%">
        <tiles:insertAttribute name="header" />
</td>
</tr>
<tr>
<td height="20%" colspan="2">
        <tiles:insertAttribute name="menu" />
</td>
</tr>
<tr>
<td width="20%" height="250">
        <div id="Main">
                <div id="LeftNav">
                        <tiles:insertAttribute name="leftnav" />
                </div>  
         </div>
</td>
<td align="center">
        <tiles:insertAttribute name="body" />
</td>
</tr>
<tr>
<td height="20%" colspan="2">
        <div id="FooterContainer">
                <div id="Footer">
                        <tiles:insertAttribute name="footer" />
                </div>
        </div>  
</td>
</tr>
</table>
</div>  
</body>
</html>




Here is tiles-defs.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd";>

<tiles-definitions>

    <definition name="DisplayDefects" template="/layouts/template.jsp">
            <put-attribute name="title" value="Tiles tutorial homepage" />
            <put-attribute name="header" value="/header.jsp" />
            <put-attribute name="menu" value="/menu.jsp" />
            <put-attribute name="leftnav" value="/leftnav.jsp" />
            <put-attribute name="body" value="/showdefects2.jsp" />
            <put-attribute name="footer" value="/footer.jsp" />
        </definition>

    <definition name="UpdateDefect" template="/layouts/template.jsp">
            <put-attribute name="title" value="Tiles tutorial homepage" />
            <put-attribute name="header" value="/header.jsp" />
            <put-attribute name="menu" value="/menu.jsp" />
            <put-attribute name="leftnav" value="/leftnav.jsp" />
            <put-attribute name="body" value="/updatedefect.jsp" />
            <put-attribute name="footer" value="/footer.jsp" />
        </definition>

    <definition name="AddDefect" template="/layouts/template.jsp">
            <put-attribute name="title" value="Tiles tutorial homepage" />
            <put-attribute name="header" value="/header.jsp" />
            <put-attribute name="menu" value="/menu.jsp" />
            <put-attribute name="leftnav" value="/leftnav.jsp" />
            <put-attribute name="body" value="/adddefect.jsp" />
            <put-attribute name="footer" value="/footer.jsp" />
        </definition>

    <definition name="Logon" template="/layouts/template.jsp">
            <put-attribute name="title" value="Tiles tutorial homepage" />
            <put-attribute name="header" value="/header.jsp" />
            <put-attribute name="menu" value="/menu.jsp" />
            <put-attribute name="leftnav" value="/leftnav.jsp" />
            <put-attribute name="body" value="/logon.jsp" />
            <put-attribute name="footer" value="/footer.jsp" />
        </definition>
        
        <definition name="Search" template="/layouts/template.jsp">
            <put-attribute name="title" value="Tiles tutorial homepage" />
            <put-attribute name="header" value="/header.jsp" />
            <put-attribute name="menu" value="/menu.jsp" />
            <put-attribute name="leftnav" value="/leftnav.jsp" />
            <put-attribute name="body" value="/search.jsp" />
            <put-attribute name="footer" value="/footer.jsp" />
        </definition>

</tiles-definitions>














On Tue, Nov 10, 2009 at 9:40 AM, Brian Stewart <[email protected]> wrote:
> Sounds like you have an error in your template.jsp.  Can you post the 
> contents and the tiles include?
>
> Regards,
> Brian Stewart
>
> -----Original Message-----
> From: Andy T [mailto:[email protected]]
> Sent: Tuesday, November 10, 2009 8:34 AM
> To: [email protected]
> Subject: javax.servlet.ServletException: JSPException including path 
> '/layouts/template.jsp'.
>
> Hi All,
>
> I am new to tiles and I have a small struts application that uses
> tiles.  On one of the .jsp pages in the application I have search
> functionality by certain criteria.  I want to search by criteria and
> then reload the SAME .jsp page which shows the results of the search.
> However, when I attempt to do this I get the exception shown in the
> subject above.  How do I reload the same .jsp after executing code on
> the server in my action with Tiles?
>
> In my struts-config I have this:
>
> <action path="/search" type="Search"
> name="DefectForm"
> input="/error.jsp"
> scope="session"
> cancellable="true"
> validate="true">
> <forward name="success" path="/test5.jsp"/>
> <forward name="failure" path="/submitpage.jsp"/>
> </action>
>
> <action path="/searchresults" type="SearchResults"
> name="DefectForm"
> input="/error.jsp"
> scope="session"
> cancellable="true"
> validate="true">
> <forward name="success" path="/test5.jsp"/>
> <forward name="failure" path="/submitpage.jsp"/>
> </action>
>
> Here's the exception report:
>
> javax.servlet.ServletException: JSPException including path
> '/layouts/template.jsp'.
>        
> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
>        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>        org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>
>
> root cause
>
> org.apache.jasper.JasperException: JSPException including path
> '/layouts/template.jsp'.
>        
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
>        
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
>        
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>        
> org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)
>        
> org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
>        
> org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
>        
> org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>        org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>        
> org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>        org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>        
> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>        org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>
>
> root cause
>
> org.apache.tiles.impl.CannotRenderException: JSPException including
> path '/layouts/template.jsp'.
>        
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:691)
>        
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:643)
>        
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:626)
>        
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322)
>        
> org.apache.tiles.jsp.taglib.InsertDefinitionTag.renderContext(InsertDefinitionTag.java:66)
>        
> org.apache.tiles.jsp.taglib.InsertTemplateTag.render(InsertTemplateTag.java:81)
>        org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220)
>        
> org.apache.jsp.test5_jsp._jspx_meth_tiles_005finsertDefinition_005f0(test5_jsp.java:92)
>        org.apache.jsp.test5_jsp._jspService(test5_jsp.java:63)
>        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>        
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
>        
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>        
> org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)
>        
> org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
>        
> org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
>        
> org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>        org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>        
> org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>        org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>        
> org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>        org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>
> Thanks,
>
> Andy
> This message is confidential, intended only for the named recipient
> and may contain information that is privileged or exempt from
> disclosure under applicable law.  If you are not the intended
> recipient, you are notified that the dissemination, distribution or
> copying of this message is strictly prohibited.  If you receive
> this message in error, or are not the named recipient, please
> notify the sender at the email address listed above.
>
>

Reply via email to