jakarta-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <martin.coo...@tumbleweed.com>
Subject RE: Differences between Structs and Turbine ???
Date Tue, 08 Oct 2002 00:41:38 GMT


> -----Original Message-----
> From: Jon Scott Stevens [mailto:jon@latchkey.com]
> Sent: Monday, October 07, 2002 5:28 PM
> To: general@jakarta.apache.org
> Subject: Re: Differences between Structs and Turbine ???
> 
> 
> Actually, yes. 
> 
> Here is the specific reason(s):
> 
> http://jakarta.apache.org/velocity/ymtd/ymtd-saying-hello.html

Of course, I know Velocity fans won't like this any better, but if you bring
the JSP example on that page up to date, using JSTL, you'll have this:

<html>
<head><title>Hello</title></head>
<body>
<h1>
<c:choose>
  <c:when test="${empty param.name}">
    Hello World
  </c:when>
  <c:otherwise>
    Hello, <c:out value="${param.name}"/>
  </c:otherwise>
</c:choose>
</h1>
</body></html>

No hoops to jump through any more.

--
Martin Cooper


> 
> Most specifically, if you want to make the word "doesn't" in 
> the example
> below bold...now, you have embedded HTML into your 
> println...and we know it
> isn't MVC to embed HTML into Java code, right?
> 
> #if ($foo)
>   Andy <b>doesn't</b> think its good
> #end
> 
> Of course I wrote the YMTD document so that we don't have to 
> have these same
> discussions over and over again.
> 
> -jon
> 
> -- 
> StudioZ.tv /\ Bar/Nightclub/Entertainment
> 314 11th Street @ Folsom /\ San Francisco
>         http://studioz.tv/
> 
> on 2002/10/7 5:13 PM, "dion@multitask.com.au" 
> <dion@multitask.com.au> wrote:
> 
> > And to resurface the old issue, this is so much worse than
> > 
> > #if (..)
> > #end
> > 
> > in Velocity...?
> > --
> > dIon Gillard, Multitask Consulting
> > Work:      http://www.multitask.com.au
> > Developers: http://adslgateway.multitask.com.au/developers
> > 
> > 
> > "Andrew C. Oliver" <acoliver@apache.org> wrote on 
> 08/10/2002 09:50:15 AM:
> > 
> >> Right...my problem with JSP isn't its dogged speed its the 
> conceptual
> >> nastiness of it.
> >> 
> >> <% 
> >> if (you.have(this).in.your(html)) {
> >>    out.println("Andy doesn't think its good");
> >> }
> >> %>
> >> 
> >> -Andy
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:general-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:general-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:general-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:general-help@jakarta.apache.org>


Mime
View raw message