<% if (condition) { %>
output blah blah blah -- condition is true
<% } else { %>
you failed
<% } %>
The above syntax you had in your email is exactly what we do here. Of course, as
most of you know, we don't use the markup tags we strictly do Java code inside <%
... %>. I find it interesting that as most of you try to deal with using markup
tags, you inevitably run into commands/tags that are supplied. There is a reason
why languages like Perl, C, and Java have so many commands, and that's because
inevitably you are going to need to use them. As someone mentioned, what about
the Case command? What about for next loops? Eventually you will simply redevelop
the language, but it won't be a common language like Java it will be something
original and new to most developers. One big advantage of JSP is that you can
hire an experienced Java developer, regardless if he has ever heard of JSP.
Brian N. Burridge
Web Analyst
Cox Target Media
http://www.burridge.net/jsp
Anil K. Vijendran wrote:
> YMMV but I'm not too excited about turning HTML into a language with
> programming constructs etc. I'd rather see support for defining your own
> tags and hope that people would design app/domain specific tags whose
> implementations are in a good programming language like Java (with
> hopefully a standard tag library for very few general purpose tags: I
> wouldn't go farther than IF) instead of using things like SWITCH etc to
> accomplish similar things.
>
> What next -- a CLASS tag? :-) I'm tempted to implement something like
> this: :-)
>
> <class name="foo" abstract="false" access="public">
> <method name="print">
> <!-- output fun html stuff here -->
> </method>
> </class>
>
> Seriously though, I'm curious why something like
>
> <% if (condition) { %>
> output blah blah blah -- condition is true
> <% } else { %>
> you failed
> <% } %>
>
> wouldnt work just great?
>
> -Anil
> JSP team
>
> Walter Jerusalinsky wrote:
> >
> > What about this? :
> >
> > <SWITCH .....>
> >
> > <CASE ....>
> > .....
> > </CASE>
> >
> > <CASE ....>
> > .....
> > </CASE>
> > ......
> > <DEFAULT>
> > .....
> > </DEFAULT>
> >
> > </SWITCH>
> >
> > But please let it for JSP 2.0 (We want 1.0 now!)
> >
> > Walter
> >
> > > -----Original Message-----
> > > From: A mailing list about Java Server Pages specification and reference
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Rod McChesney
> > > Sent: Tuesday, April 27, 1999 10:47 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: ELSE tag
> > >
> > >
> > > To retain some vestige of HTML or XML syntax, I believe this would
> > > have to look like
> > >
> > > <IF>
> > > <ELSE>
> > > </ELSE>
> > > </IF>
> > >
> > > and so on. Otherwise the tags don't nest meaningfully. This kind of
> > > thing is easy to hack into a parser but SGML/HTML/XML tools won't
> > > necessarily understand it. Unless I'm just missing something...
> > >
> > > Rod McChesney, Korobra
> > >
> > >
> > > Stuart Hargreaves wrote:
> > > >
> > > > At 03:38 PM 4/27/99 -0700, you wrote:
> > > > >vis a vis the discussion regarding the '.' vs. the ':', why even
> > > > >call these things "includeif"??
> > > > >
> > > > >I vote for a more programmatic syntax, like, say, "if/else" ala
> > > > >most common programming languages such as c, java and c++.
> > > >
> > > > I vote "aye" to that. I'd also like to see a convention similar to
> > > > <ELSEIF>, or <ELSEINCLUDEIF> or something to that effect.
> > > >
> > > > For example...
> > > > <INCLUDEIF PROPERTY="bean:[property]" VALUE="value1">
> > > > foo
> > > > <ELSEINCLUDEIF PROPERTY="bean:[property]" VALUE="value2">
> > > > bar
> > > > <ELSE>
> > > >
> > > > >Of course what is the analog for the <excludeif> tag? Does
> > > > ><excludeif><else></excludeif> make any sense? Or does it just
> > > > >give you a headache like it does me?
> > > >
> > > > With the existance of <ELSE>, the need for <EXCLUDEIF> would go away.
> > > >
> > > > For example:
> > > > <INCLUDEIF PROPERTY="bean:[property]" VALUE="value1">
> > > > do nothing
> > > > <ELSE>
> > > > foo
> > > > </INCLUDEIF>
> > > >
> > > > And as Terry mentioned, it would make more sense to use <IF> <ELSEIF>
> > > > <ELSE>. Of course, this would require a closeing tag, perhaps </IF> ?
> > > >
> > > > My .02
> > > > Stuart G. Hargreaves
> > > > [EMAIL PROTECTED]
> > > > (W) 415.659.6314
> > > >
> > > >
> > > ==================================================================
> > > =========
> > > > To unsubscribe, send email to [EMAIL PROTECTED] and include
> > > in the body
> > > > of the message "signoff JSP-INTEREST". For general help, send email to
> > > > [EMAIL PROTECTED] and include in the body of the message "help".
> > >
> > > ==================================================================
> > > =========
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include
> > > in the body
> > > of the message "signoff JSP-INTEREST". For general help, send email to
> > > [EMAIL PROTECTED] and include in the body of the message "help".
> > >
> >
> > ===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> > of the message "signoff JSP-INTEREST". For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JSP-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".