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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>

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


Reply via email to