jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Knystautas" <ser...@lokitech.com>
Subject Re: new [provisional] taglib "scopes" added to CVS
Date Wed, 07 Mar 2001 01:15:54 GMT
Hi,

We don't have it as a separate tag, but as an underlying concept in our
internal tag library, we use this same concept.  Here are the scopes we use
and what they're equivalent to...

request -> request.getAttribute(name)
session -> session.getAttribute(name)
page -> page.getAttribute(name)
application -> application.getAttribute(name) (servlet context)
form -> request.getParameter(name) (note this is also multipart form aware)
header -> request.getHeader(name)
cookie -> scans through Cookie[] from request.getCookies(), finds one that
matches name, and returns the value
app-init -> application.getInitParameter(name)

app-init could probably use a better name, but in any case, the extensive
list of scopes means our tags can quickly pull information from most places
a JSP will want to get info.  Thought you might want to include these into
your list of scopes if you were to do this kind of tag(s).

Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "Morgan Delagrange" <mdelagra@yahoo.com>
To: "taglibs-dev" <taglibs-dev@jakarta.apache.org>
Sent: Tuesday, March 06, 2001 6:57 PM
Subject: new [provisional] taglib "scopes" added to CVS


> Hi all,
>
> A while back, we discussed the possibility of
> repackaging "application", "page", "request" and
> "session" taglibs into a single library.  In the
> interest of exploration, I've checked in a small
> library that may become the nucleus for such a
> project.  Please note that this is just a starting
> point; I have not yet even ported in most of the
> existing functionality.
>
> My intention here is to make a tag library that's
> easier to use and more closely mimics the syntax of
> some of the standard JSP tags.  For example, instead
> of having separate tags for getting attributes, there
> is a single attribute tag with a "scope" attribute:
>
>   <scopes:attribute name="foo" scope="request"/>
>
> I also thinking about getting rid of the
> "value='false'" syntax on tags like existsAttribute,
> existsParameter, etc. tags in favor of seperate tags,
> which I think will be much clearer:
>
>   <scopes:existsAttribute name="foo"/>
>   <scopes:notExistsAttribute name="foo"/>
>
> Finally, I'd like to review the overlap between our
> tags and some of the tags in the Struts taglib.
> Clearly the usage of our tags is quite different, and
> perhaps everything fine, but I'd like to make sure
> there's no potential for convergence.
>
> - Morgan
>
>
> - Morgan
>
> =====
> Morgan Delagrange
> Britannica.com
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>


Mime
View raw message