tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject Re: c:set and scriptlets
Date Mon, 11 Mar 2002 16:23:45 GMT
On Tue, 12 Mar 2002, Soefara Redzuan wrote:

> > > I'd like to be able to access the variable x from within a scriptlet,
> > > something like:
> > >
> > > <%
> > > 	x = x++;
> > > %>
> > >
> > > and vice versa.
> > >
> > > Is this even possible?  I don't see anything in the docs that refer to
> > > such interchangeability. 8(
> >
> >JSTL doesn't particularly encourage this usage, but it's perfectly
> >possible using older, scriptlet-oriented mechanisms like <jsp:useBean>.
> >Just use a <jsp:useBean> tag after <c:set> to declare your scripting
> >variable.
> 
> Does "older" mean that scriptlet-oriented mechanisms should not be
> used and we should use JSTL if possible ?

I personally recommend that approach, and I think a lot of others agree
with me.  JSTL promotes simple web pages and division of labor, in
environments where that's appropriate.  It's much easier for
nonprogrammers -- and programmers too -- to maintain web pages that don't
contain any Java code.  JSTL was designed from the ground up with web-page
authors in mind.

--
Shawn Bayern
Author, "JSP Standard Tag Library"  http://www.jstlbook.com
(coming this spring from Manning Publications)


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


Mime
View raw message