struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: Tiles headaches - should be simple - driving me nuts here...
Date Fri, 14 Apr 2006 23:09:37 GMT
Hi Rick,

I can't see anything that looks wrong but a couple of ideas might throw 
something up:

- mainLayout.jsp is in / but your other jsps are in WEB-INF/jsp/ - is 
that right?

- try renaming your tiles 'put-names', e.g. header -> headerTile (I find 
this gives more readily comprehensible errors from Struts)

- check that each module's struts-config either contains the correct 
tiles plugin reference, or doesn't contain one at all


Intriguing!


rgds
Adam

Rick Reumann on 14/04/06 21:04, wrote:
> I've used Tiles in the past. Started to implement it in this new app,
> and I keep getting error messages like...
> 
> javax.servlet.jsp.JspException: Error - Tag Insert : No value found
> for attribute 'header'.
> 	at org.apache.struts.taglib.tiles.InsertTag.processAttribute(InsertTag.java:690)
> 	at org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:478)
>         <snip/>
> 
> Basically it seems as if none of the attributes I define in my tiles
> definition file are being able to be picked up by the main layout. I'm
> hoping someone can pick up something that I'm doing really dumb here.
> 
> Here's some info..
> 
> Tiles Definition
> ---------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE tiles-definitions PUBLIC
>           "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
>           "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
> <tiles-definitions>
> 
>     <definition name="main.layout" path="/mainLayout.jsp">
>         <put name="header" value="/WEB-INF/jsp/header.jsp"/>
>         <put name="content" value="yrdy"/>
>     </definition>
>     <definition name="main.page" extends="main.layout">
>         <put name="content" value="/WEB-INF/jsp/main.jsp"/>
>     </definition>
> 
> </tiles-definitions>
> 
> (files header.jsp and main.jsp exist. mainLayout.jsp displays fine
> also when I remove the tiles:insert sections.) I've also tried the
> above 1_3.dtd defintion, but I think that gave me other problems. I
> know the above 1_1 version was working in another app that I believe
> had my 1.2.7 struts jar.
> 
> mainLayout.jsp
> ---------------------
> 
> <%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles" %>
> <---- snipped out extra html junk ----->
> <body>
> <div id="contents">
>     <tiles:insert attribute="header"/>
> 
>     <div id="main-content-box">
>        <tiles:insert attribute="content"/>
>     </div>
> </div>
> 
> Again, if I comment out the above tiles:insert lines this page will
> display (minus the tiles content I'm trying to add of course).
> 
> struts-config
> -----------------
> The docs are a bit confusing on this, since in the docs it says you should add
> 
> <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"></controller>
> 
> I've tried including and remove the above.
> 
> I also include the plugin definition:
> 
> <plug-in className="org.apache.struts.tiles.TilesPlugin">
>         <set-property property="definitions-config"
> value="/WEB-INF/tiles-definitions.xml"/>
>         <set-property property="moduleAware" value="true"/>
>         <set-property property="definitions-parser-validate" value="true"/>
>     </plug-in>
> 
> 
> Other thoughts
> ---------------------
> I removed all filters that I have running, thinking maybe they were
> mangling some request or session parameters.
> 
> The test i'm doing from the index page just has
> 
> <a href="authenticate.do">clickme</a>
> 
> And the action-mapping for it:
> 
> <action
>     path="/authenticate"
>     type="com.nielsenmedia.npn.action.AuthenticateAction"
>     >
> <forward name="success" path="main.page"/>
> </action>
> 
> The AuthenticatAction has been stripped down to simply return
> "success" (It doesn't do anything).
> 
> I'm using Struts 1.2.9 but also tried some older jars like 1.2.7.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message