struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduardo Simioni" <eduardo.simi...@summa-tech.com>
Subject Re: Tiles +GetTag +Tomcat 5.? problem
Date Thu, 09 Nov 2006 19:49:00 GMT
Chris, I'm just supporting the "developers" team on this error, don't
know much about the project.
I know that nothing is being defined in the tiles definition file.
Page components are being defined on the caller page, via <tiles:put
/>, and the menu attribute is being defined programmatically.

The main problem is that it used to work as it is on Sun Application
Server 7, and on SAS8  something has to be made to get it working
again.

That's why I thought it wasn't a bug on Tiles. But it's difficult to point.

The solution I found is ok from my point of view, easy to implement.

Again, thanks for helping!

Eduardo Simioni.

On 11/9/06, Chris Pratt <thechrispratt@gmail.com> wrote:
> In your tiles definition, where you define the menu attribute, make sure
> that it is marked type=string.  You should have something similar to:
>
>   <definition name="register2.pane" extends="default.pane">
>     <put name="pagetitle" value="members" type="string"/>
>     <put name="body" value="register2.layout" type="definition"/>
>     <putList name="breadcrumbs">
>       <add value="/|head.home" type="string"/>
>       <add value="/home|members" type="string"/>
>       <add value="member.registration" type="string"/>
>     </putList>
>   </definition>
>
> either in your tiles-defs.xml or using the JSP version in one of your
> pages.  If now, how are you defining the menu tiles attribute?
>   (*Chris*)
>
> On 11/9/06, Eduardo Simioni <eduardo.simioni@summa-tech.com> wrote:
> >
> > I was reading some posts on dev list and realized that GetTag is
> > obsolete and going to be removed soon.
> >
> > Well, the tag lib for tiles doesn't define attribute 'type' for get
> > nor insert tags. So I didn't understand Chris' suggestion.
> >
> > If I change
> > <tiles:get name="menu" />
> > for
> > <tiles:insert attribute="menu" ignore="true" />
> > it works well.
> > Here there's no doubt about the kind of component I'm trying to insert.
> > Then, the processAttribute() method throws a JspException and the
> > error is ignored.
> >
> > Get is failing to ignore the error cause it happens on the last line
> > of doStartTag() method, not on the line surrounded by the 'try'.
> >
> > *******
> >                 try {
> >                         tagHandler = createTagHandler(); // With insert,
> > error happens here
> >
> >                 } catch (JspException e) {
> >                         if (isErrorIgnored) {
> >                                 processEndTag = false;
> >                                 return SKIP_BODY;
> >                         } else {
> >                                 throw e;
> >                         }
> >                 }
> >
> >                 return tagHandler.doStartTag(); // With get, error happens
> > here
> > *******
> >
> > Unfortunately I don't have time to prepare a simple example for test.
> > I have to support the programmers on the next problem.
> > World is getting full of pseudo Java programmers :/
> >
> >
> > Thanks for your help!
> >
> > Eduardo Simioni.
> >
> > On 11/9/06, Chris Pratt <thechrispratt@gmail.com> wrote:
> > > Make sure you define the menu attribute to by type=string, it seems to
> > be
> > > assuming that menu is type=page.
> > >   (*Chris*)
> > >
> > > On 11/9/06, Antonio Petrelli <apetrelli@apache.org> wrote:
> > > >
> > > > Eduardo Simioni ha scritto:
> > > > > Hi all,
> > > > >
> > > > > I'm facing a problem with Tiles GetTag on recent Tomcat versions
> > > > > (couldn't find the exact version, but is the one packaged with Sun
> > > > > Application Server EE 8).
> > > > >
> > > > > I have (among others) a <tiles:get name="menu" /> tag.
> > > > >
> > > > > That "menu" can be present or not as it is programmatically
> > inserted.
> > > > > If it's not present, the page should just omit it.
> > > > > ...
> > > > > If the the attribute is null:
> > > > > ...
> > > > > Tiles doesn't find the attribute (ok until here), but then, it tries
> > > > > to process it as a URL and falls on the following error: "The
> > > > > requested resource (/jsp/_template/menu) is not available". This
> > error
> > > > > is shown on the page, where nothing should appear.
> > > > >
> > > > > This happens even if I set the attribute ignore="true" in the tag
> > > > > (what is not necessary on earlier Tomcat versions).
> > > >
> > > > I don't think it's a Tomcat bug, but a Tiles one: the "ignore"
> > attribute
> > > > should manage your case. Can you provide a small test case and, if it
> > > > fails, can you open a JIRA issue?
> > > > Thank you
> > > > Antonio
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>

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


Mime
View raw message