struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Nicholson <>
Subject RE: Probable bug with nested:root and tiles context
Date Thu, 02 Sep 2004 15:02:43 GMT
Hi Jimmy,

It's a bug in my opinion. We use Struts 1.1, but it could be fixed in newer
versions (?).

A workaround is to just re-nest the same root context (using the special "/"
syntax), so the root context isn't deleted until you've finished with the
form, ie:

<nested:form action="whatever">
  <nested:nest property="/">

     <tiles:insert .../>
     <tiles:insert .../>


in your main layout tile. Then sub-tiles that use nested tags can never
reach the top-level nesting, and therefore, the context isn't deleted


-----Original Message-----
From: VAN BROECK Jimmy []
Sent: 02 September 2004 14:37
Subject: Probable bug with nested:root and tiles context

I think i discovered a bug in the nested:root tag when used in combination
with tiles or even dynamic includes of jsp pages.
Let's considere the following scenario :
You have a main tile where your nested:form tag is defined and there you
include you tiles through tiles:input
<nested:form action="action">
<tiles:input value="tile1"/>
<tiles:input value="tiles2"/>
In the tiles you want to refere to the actionForm bean of your nested:form.
This can be done easily just through <nested:root> without specifying a
<nested:nest property="view">
Tile2: the same thing as tile1:
<nested:root> <!--failure: bean not found in context -->
<nested:nest property="anotherView">
The problem here is, that in the doEndTag, there is only checked if previous
nesting is null and then to delete the nestedreference from the request.
 public int doEndTag() throws JspException {
    /* reset the reference */
    HttpServletRequest request =
    if (originalNesting == null) {
    } else {
      NestedPropertyHelper.setName(request, originalNestingName);
      NestedPropertyHelper.setProperty(request, "nestOne");
    } = originalName;
    return (EVAL_PAGE);
I think the first bug is that the end of a root tag should not check the
originalNesting==null, but the originalNestingName==null, because the
property would always be null?? (You're on the root right??).
The second bug or remark, would be that if you didn't specify a bean Name,
you absolutely don't want the nestedReference being deleted, because you are
depending on another reference, declared above this root tag.
Please post your opinions, and if enough people think this is a bug, i will
make a bugzilla report of this.

Jimmy Van Broeck 

email:  <mailto:jimmy.van.broeck@e> 

WTC II - Kantoor 307 


This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.

Ce Message est uniquement destiné aux destinataires indiqués et peut
contenir des informations confidentielles. Si vous n'êtes pas le
destinataire, vous ne devez pas révéler le contenu de ce message ou en
prendre copie. Si vous avez reçu ce message par erreur, veuillez en informer
l'expéditeur, ou La Poste immédiatement, avant de le supprimer.

Dit bericht is enkel bestemd voor de aangeduide ontvangers en kan
vertrouwelijke informatie bevatten. Als u niet de ontvanger bent, dan mag u
de inhoud van dit bericht niet bekendmaken noch kopiëren. Als u dit bericht
per vergissing heeft ontvangen, gelieve er de afzender of De Post
onmiddellijk van op de hoogte te brengen en het bericht vervolgens te

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message