Hi,

I am trying to create a simple welcome page using tiles. I picked up the code from 
'Struts Kick Start' - Chapter 16
Using Struts 1.1, JDk1.3, Tomcat4.1.24,ant 1.5

When i do : http://localhost:8080/EGReports_Ver001/test.do , nothing is displayed. The 
source is :

<TABLE width="100%" BORDER="1" CELLPADDING="5">
 <TR>
  <TD WIDTH="250" VALIGN="TOP" HALIGN="LEFT">
   
  </TD>

  <TD VALIGN="TOP">
   
  </TD>
 </TR>
</TABLE>
</body>
</html>


When i do :http://localhost:8080/EGReports_Ver001/layouts/header.jsp i get the 
following error


HTTP Status 500 - 

--------------------------------------------------------------------------------

type Exception report

message 

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception 

org.apache.jasper.JasperException: Error - tag.getAsString : component context is not 
defined. Check tag syntax
        at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

----------------------------------------------------------------


Here is how i have included the plugin in struts-config.xml

------------------struts-config.xml---------------------------------
  </action-mappings>
    <action    path      = "/test"
        type      = "org.apache.struts.action.ActionMapping"
            forward   = "main.index"
     >
    </action>
  </action-mappings>

<plug-in className="org.apache.struts.tiles.TilesPlugin" >
 <set-property property="definitions-config"
 value="/WEB-INF/TilesDefinitions.xml" />
 <set-property property="definitions-debug" value="2" />
 <set-property property="definitions-parser-details" value="2" />
 <set-property property="definitions-parser-validate" value="true" />
</plug-in>
-------------------TilesDefinition.xml-------------------------------------
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles 
Configuration//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>
<tiles-definitions>
 <definition name="reporting.default" path="/layouts/reportingDefault.jsp">
  <put name="header" value="/header.jsp"/>
 </definition>
 <definition name="main.index" extends="reporting.default">
  <put name="title" value="Welcome to EG Reporting"/>
 </definition>
</tiles-definitions>
-------------------reportingDefault.jsp-------------------------------------
<%@ taglib uri="../WEB-INF/struts-tiles.tld" prefix="tiles"%>
<tiles:importAttribute name="title"/>
<tiles:insert attribute="header">
 <tiles:put name="title" />
</tiles:insert>

<TABLE width="100%" BORDER="1" CELLPADDING="5">
 <TR>
  <TD WIDTH="250" VALIGN="TOP" HALIGN="LEFT">
   <tiles:insert attribute="header"/>
  </TD>
 </TR>
</TABLE>
</body>
</html>
-------------------Header.jsp-------------------------------------
<%@ taglib uri="../WEB-INF/struts-tiles.tld" prefix="tiles"%>
<html>
<head>
 <title>
  <tiles:getAsString name="title"/>                                                
-----------------------------> PROBLEM AREA
 </title>
</head>
<body>
<table width="100%">
 <tr>
  <td align="CENTER"><H1>STOCK TRACKER</H1></td>
 </tr>
 <tr>
  <td align="CENTER">Your Insider's View to Wall Street</td>
 </tr>
</table><P>
-----------------------------------------------------------------


What am i doing wrong? 

Thanks
Charu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to