Here's the first few lines of the root cause of the exception I'm getting:

root cause

javax.servlet.ServletException: Error - Tag Insert : No value defined for bean 'admin' 
with property 'null' in scope 'request'.
        at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)
        at org.apache.jsp.employeeLanding_jsp._jspService(employeeLanding_jsp.java:59)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


Here's my web.xml entries:


 <taglib>
   <taglib-uri>/WEB-INF/struts-tiles</taglib-uri>
   <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
 </taglib>

Here's my struts-config entries:


<plug-in className="org.apache.struts.tiles.TilesPlugin" > <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" /> <set-property property="definitions-debug" value="2" /> </plug-in>


Here's my tiles-defs.xml entries:


<tiles-definitions>
<definition name="admin" path="/admin/templates/backendMain.jsp"> <put name="page-title" value="QuatraData :: Default" />
<put name="logo-content" value="/logoDefault.jsp" />
<put name="menu-layout" value="/menuBar.jsp" /> </definition>
</tiles-definitions>





Here's the page I'm trying to use the template in:


<[EMAIL PROTECTED] contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<tiles:insert beanName="admin" beanScope="request"/>

( what I'm trying to do is just have a page that uses all the defaults specified in tiles-defs, that's why I have no put tags )


Here's the template itself:


<[EMAIL PROTECTED] contentType="text/html"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title><tiles:getAsString name="page-title" /></title>
<script language="Javascript">
function launchTimeClock(){
window.open( "./timeclock/timeClock.jsp", "puchClock", "resizeable=no, height=170, width=230");
}


       </script>
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#CCCCCC" onLoad="launchTimeClock();">

<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="300">
<!-- Logo Content -->
<tiles:insert name="logo-content" />
</td>
<td valign="top">
<tiles:insert name="menu-layout" />
</td> </tr>
</table>
</body>
</html>




Here's the pages that should be inserted:

logoDefault.jsp:

I am a logo

menuBar.jsp:

My Menu Bar




If I don't use definition, if I just use a template and then manually use tiles:put, it works fine.


Any help would be great, I can supply any other requested information.




Reply via email to