I have been unable to get Tiles to work under Struts 1.3.5.  I also
noticed that none of the Struts 1.3.5 examples use Tiles.   Below is a
summary of the problem.  The only place where my implementation deviates
from the documentation is in the tiles-defs.xml file.  If anyone know
what I need to do to get it to work, it would be appreciated.  Thanks.
 
==========
 
  I installed Tomcat 5.5.20 onto a Red Hat Linux 4.0 box.  I opened up
the "blank.war" app that comes with Struts 1.3.5.  I modified web.xml
and struts-config.xml as specified in the Struts 1.3.5 Tiles
documentation.
 
  Here's my test JSP:
 
  <%@ taglib uri="http://struts.apache.org/tags-tiles"; prefix="tiles" %>
 
<html>
  <head>
    <title>FooBar</title>
  </head>
  <body>
<tiles:insert attribute="foo"/>
  </body>
</html>
 
 
  Here's my tiles-defs.xml:
 
<?xml version="1.0" encoding="ISO-8859-1" ?>
    
    <!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
       "http://struts.apache.org/dtds/tiles-config_1_3.dtd";>  
 
    <tiles-definitions>    
    <definition name="foo" path="/bar.jsp" >
    </definition>        
    </tiles-definitions>
 
 
  I get this error:
 
org.apache.jasper.JasperException: Exception in JSP: /parent.jsp:8

5:     <title>FooBar</title>
6:   </head>
7:   <body>
8: <tiles:insert attribute="foo"/>
9:   </body>
10: </html>


Stacktrace:
        
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:506)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:395)
        
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause 

java.lang.NullPointerException
        
org.apache.struts.tiles.taglib.InsertTag.processAttribute(InsertTag.java
:687)
        
org.apache.struts.tiles.taglib.InsertTag.createTagHandler(InsertTag.java
:478)
        
org.apache.struts.tiles.taglib.InsertTag.doStartTag(InsertTag.java:438)
        
org.apache.jsp.parent_jsp._jspx_meth_tiles_insert_0(parent_jsp.java:85)
        org.apache.jsp.parent_jsp._jspService(parent_jsp.java:59)
        
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:334)
        
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

**************************************************************************************************
CONFIDENTALITY NOTICE: This e-mail communication and any attachments may 
contain confidential and 
privileged information protected from disclosure by law. It is intended only 
for the use of the specified 
recipients.  Any unauthorized review, use, disclosure, distribution or any 
action based on this material is 
prohibited.  If you are not the intended recipient, please contact the sender 
by reply e-mail and destroy all 
copies of the original message.
**************************************************************************************************

Reply via email to