struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: Niall's if/then/else tags and switch/case/default?
Date Mon, 10 Sep 2001 00:28:12 GMT


On Mon, 10 Sep 2001, Niall Pemberton wrote:

> Date: Mon, 10 Sep 2001 00:27:20 +0100
> From: Niall Pemberton <niall.pemberton@btInternet.com>
> Reply-To: struts-dev@jakarta.apache.org
> To: struts-dev@jakarta.apache.org
> Subject: RE: Niall's if/then/else tags and switch/case/default?
>
> I dont know how good JSPTL is because its dependant on Tomcat 4 (and/or JSP
> 1.2) and thats where the problem lies - we are using Tomcat 3 so I haven't
> looked at it. When Nivarna comes and JSPTL is part of the JSP spec (1.3
> perhaps?) and everyones using servlet containers that support it then this
> stuff is redundant.
>

JSPTL will require JSP 1.2 (not 1.3).  That means Tomcat 4 right now, but
the Servlet 2.3 and JSP 1.2 specs are going final in a few days, so you
will quickly see a *lot* more implementations.

> The question is, when is that going to be and whats the best thing to do in
> the meantime for a) people using JSP 1.1 and b) people using JSP 1.2?
>

Servlet 2.2/JSP 1.1 users should upgrade to a 2.3/1.2 container as soon as
your vendor produces one.  Backwards compatibility for 2.2/1.1 based apps
is *required* by the specs, so this should not be a problem -- and maybe
the remaining annoying JSP compatibility bugs in current containers will
be fixed as well :-).

(Tomcat 4 goes final, according to the current schedule, on Sept. 17.)

> My tags also included a switch/case/default which is equivalent to the
> choose/when/otherwise pattern in JSPTL and the if/else also supports
> and/or/elseif tags.
>
> I could re-engineer the if/else/elseif to not need a "then" and I believe
> this would make them as elegant as they could be. However its not worth it
> if theres no enthusiasm for the tags and everyones either switching to JSPTL
> or happy to go with whats already there (scriptlet or the current logics
> tags) until they switch to JSPTL.
>

For my personal apps, I'm going to focus on JSPTL tags once they are
stable.  For Struts, *I* don't have a lot of enthusiasm for adding new
control structure tags to Struts, although some other committer might -
and that's OK with me.

Lobbying the JSPTL group to add if/then/else to JSPTL should be directed
to their feedback address, although this issue was *very* extensively
discussed, so I would not hold my breath.

What I do plan to do, however, is retrofit the existing Struts tags to
support the JSPTL expression language, once they select one, in addition
to the current beanutils-based property access.  That will ease conversion
and migration of existing apps substantially.

> Niall
>

Craig


>
> > -----Original Message-----
> > From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
> > R. McClanahan
> > Sent: 07 September 2001 07:17
> > To: struts-dev@jakarta.apache.org
> > Subject: Re: Niall's if/then/else tags?
> >
> >
> >
> >
> > On Thu, 6 Sep 2001 martin.cooper@tumbleweed.com wrote:
> >
> > > Date: Thu, 6 Sep 2001 20:49:36 -0700
> > > From: martin.cooper@tumbleweed.com
> > > Reply-To: struts-dev@jakarta.apache.org
> > > To: struts-dev@jakarta.apache.org
> > > Subject: Re: Niall's if/then/else tags?
> > >
> > > I agree with this. In particular, I'd like to see tags of this type
> > > incorporated in JSPTL. They currently have <if>, and
> > > <choose>/<when>/<otherwise>, but no explicit <then>
or <else>
> > (although I
> > > believe those can be constructed from the others).
> > >
> >
> > The if/then/else pattern can indeed be constructed from
> > choose/when/otherwise tags in JSPTL.
> >
> > The reason that Struts never had an "else" tag in the first place is that
> > the syntax choices were all incredibly ugly, IMHO, given the restrictions
> > on the way you need to nest things to make it work.  The
> > choose/when/otherwise pattern in JSPTL is the least objectionable, and has
> > the additional advantage of gracefully implementing if ... else if ...
> > else if ... type patterns as well.
> >
> > Given that choose/when/otherwise does this (and more), I would be somewhat
> > surprised if the JSPTL expert group was willing to consider adding
> > explicit if/then/else tags as well (because they would be redundant).  But
> > the best way to find that out would be to provide feedback on the JSPTL
> > early access release (available via <http://jakarta.apache.org/taglibs>)
> > to the email address included in the docs.
> >
> > > --
> > > Martin Cooper
> > >
> >
> > Craig
> >
> >
> > >
> > > ----- Original Message -----
> > > From: "Ted Husted" <husted@apache.org>
> > > To: <struts-dev@jakarta.apache.org>
> > > Sent: Thursday, September 06, 2001 12:57 PM
> > > Subject: Re: Niall's if/then/else tags?
> > >
> > >
> > > > My take on this is here
> > > >
> > > > <
> > > >
> > http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14158.html
> > > > >
> > > >
> > > > I'm personally not in favor of distributing tags with Struts
> > that do not
> > > > depend on Struts application resoures (mappings, messages). General
> > > > purpose tags can be hosted at Jakarta Taglibs. At some point,
> > the Struts
> > > > bean and logic tags will end up over there too.
> > > >
> > > > If someone wanted to re-package the Struts logic tags for Jarkarta
> > > > Taglibs, and included Nial's extensions, I'm sure they would be well
> > > > received. Ditto for the bean tags. They already have i18n and
> > form tags
> > > > that are similar to the Struts versions.
> > > >
> > > > -Ted.
> > > >
> > > > dhay@lexmark.com wrote:
> > > > >
> > > > > Hi.  Just wondering what the status is on Niall's IF/THEN/ELSE tags
> > > being added
> > > > > to the nightly build?
> > > > >
> > > > > Cheers,
> > > > >
> > > > > Dave
> > >
> > >
> > >
> >
>
>


Mime
View raw message