You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by md...@us.britannica.com on 2000/12/18 22:08:12 UTC

taglibs contribution

Hi all,

I'd like to contribute two tag libraries (attached) to the project.  Jakarta
currently has tag libraries for only two of the four JSP scopes, request and
session.  I created tag libraries for the other two scopes.  Here's a
complete list of the new tags:

  application taglib
  ------------------
  attribute
  attributes
  existsattribute
  setattribute
  removeattribute
  equalsattribute     (new functionality)
  initparameter       (new functionality)
  initparameters      (new functionality)
  existsinitparameter (new functionality)
  equalsinitparameter (new functionality)

  page taglib
  ------------------
  attribute
  attributes
  existsattribute
  setattribute
  removeattribute
  equalsattribute     (new functionality)

The tag libraries are code-complete and well-documented.

Later this week (or so :) I'd also like to submit some new tags for the
request and session taglibs.  The tags themselves are done, but I'm still
working on the javadocs for them, and then I'll have to create diff files
against the current documentation.  Here are the tags I'd like to add:

  request taglib
  ------------------
  equalsattribute
  equalscookie
  equalsheader
  equalsparameter

  session taglib
  ------------------
  equalsattribute

When I submit my updates to the request and session taglibs, I'd like to
update the "Requirements" section of their documentation, which is not quite
accurate.  It currently reads:

>  This custom tag library requires no software other than a servlet 
>  container that supports the JavaServer Pages Specification, version 1.1.

I think this is a more accurate requirement:

>  This custom tag library requires no software other than a servlet 
>  container that supports the JavaServer Pages Specification, version 1.2.
>
>  The tag library also works in some JSP version 1.1 servlet containers, 
>  such as Tomcat, but not in others, such as Weblogic. The tags in this 
>  tag library are designed according to the JSP 1.2 specification, which 
>  makes this requirement of the <jsp:getProperty ... /> tag:
>
>    The value of the name attribute in jsp:setProperty and 
>    jsp:getProperty will refer to an object that is obtained from the 
>    pageContext object through its findAttribute() method. 
>
>  The JSP 1.1 specification does not require this behaviour, and while 
>  Tomcat happens to support it, Weblogic does not. Note that it is fairly
>  straightforward to write a custom tag that emulates this behaviour for 
>  Weblogic users. Sample source code for such a tag can be found here.

If you compare the JSP 1.1 and JSP 1.2 specification, I think you'll find
that this statement is accurate.

Well, I think these are pretty useful tags.  Let me know if you will take
them!

- Morgan Delagrange




Re: taglibs contribution

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
+1 as well.

Craig


Shawn Bayern wrote:

> On Mon, 18 Dec 2000, horwat wrote:
>
> > taglibs contribution+1 on adding these libraries to jakarta-taglibs.
> >
> > I've built the libraries successfully and tested them on Tomcat 4.0.
>
> [re: taglibs for two new contexts]
>
> I agree.  +1.
>
> Shawn


Re: taglibs contribution

Posted by Shawn Bayern <sh...@yale.edu>.
On Mon, 18 Dec 2000, horwat wrote:

> taglibs contribution+1 on adding these libraries to jakarta-taglibs.
> 
> I've built the libraries successfully and tested them on Tomcat 4.0.

[re: taglibs for two new contexts]

I agree.  +1.

Shawn


Re: taglibs contribution

Posted by horwat <Ju...@eng.sun.com>.
taglibs contribution+1 on adding these libraries to jakarta-taglibs.

I've built the libraries successfully and tested them on Tomcat 4.0.


Justyna

  ----- Original Message ----- 
  From: mdelagra@us.britannica.com 
  To: taglibs-dev@jakarta.apache.org 
  Sent: Monday, December 18, 2000 1:08 PM
  Subject: taglibs contribution


  Hi all, 

  I'd like to contribute two tag libraries (attached) to the project.  Jakarta currently has tag libraries for only two of the four JSP scopes, request and session.  I created tag libraries for the other two scopes.  Here's a complete list of the new tags:

    application taglib 
    ------------------ 
    attribute 
    attributes 
    existsattribute 
    setattribute 
    removeattribute 
    equalsattribute     (new functionality) 
    initparameter       (new functionality) 
    initparameters      (new functionality) 
    existsinitparameter (new functionality) 
    equalsinitparameter (new functionality) 

    page taglib 
    ------------------ 
    attribute 
    attributes 
    existsattribute 
    setattribute 
    removeattribute 
    equalsattribute     (new functionality) 

  The tag libraries are code-complete and well-documented. 

  Later this week (or so :) I'd also like to submit some new tags for the request and session taglibs.  The tags themselves are done, but I'm still working on the javadocs for them, and then I'll have to create diff files against the current documentation.  Here are the tags I'd like to add:

    request taglib 
    ------------------ 
    equalsattribute 
    equalscookie 
    equalsheader 
    equalsparameter 

    session taglib 
    ------------------ 
    equalsattribute 

  When I submit my updates to the request and session taglibs, I'd like to update the "Requirements" section of their documentation, which is not quite accurate.  It currently reads:

  >  This custom tag library requires no software other than a servlet 
  >  container that supports the JavaServer Pages Specification, version 1.1. 

  I think this is a more accurate requirement: 

  >  This custom tag library requires no software other than a servlet 
  >  container that supports the JavaServer Pages Specification, version 1.2. 
  > 
  >  The tag library also works in some JSP version 1.1 servlet containers, 
  >  such as Tomcat, but not in others, such as Weblogic. The tags in this 
  >  tag library are designed according to the JSP 1.2 specification, which 
  >  makes this requirement of the <jsp:getProperty ... /> tag: 
  > 
  >    The value of the name attribute in jsp:setProperty and 
  >    jsp:getProperty will refer to an object that is obtained from the 
  >    pageContext object through its findAttribute() method. 
  > 
  >  The JSP 1.1 specification does not require this behaviour, and while 
  >  Tomcat happens to support it, Weblogic does not. Note that it is fairly 
  >  straightforward to write a custom tag that emulates this behaviour for 
  >  Weblogic users. Sample source code for such a tag can be found here. 

  If you compare the JSP 1.1 and JSP 1.2 specification, I think you'll find that this statement is accurate. 

  Well, I think these are pretty useful tags.  Let me know if you will take them! 

  - Morgan Delagrange 



    


Re: taglibs contribution

Posted by Wong Kok Wai <wo...@pacific.net.sg>.
There seems to be some duplication with some tags that Struts provide
(in the Struts logic taglib). How about merging both?

mdelagra@us.britannica.com wrote:

>
>
> Hi all,
>
> I'd like to contribute two tag libraries (attached) to the project.
> Jakarta currently has tag libraries for only two of the four JSP
> scopes, request and session.  I created tag libraries for the other
> two scopes.  Here's a complete list of the new tags:
>


Re: taglibs contribution

Posted by Glenn Nielsen <gl...@voyager.apg.more.net>.
+1 to add both the page and application taglibs

I've looked at the page taglib and it looks great, I had wanted to write both of these
when I had time, but Morgan beat me to it. :-)

I would like to nominate Morgan as a Jakarta-taglib committer if he is interested.

Since there are already 3 +1's and no dissenters, I will commit these taglibs.

>  Later this week (or so :) I'd also like to submit some new tags for the request and session >taglibs.  The tags themselves are done, but I'm still working on the javadocs for them, and then >I'll have to create diff files against the current documentation.  Here are the tags I'd like to add:
>
>    request taglib 
>    ------------------ 
>    equalsattribute 
>    equalscookie 
>    equalsheader 
>    equalsparameter 
>
>    session taglib 
>    ------------------ 
>    equalsattribute 
>
>  When I submit my updates to the request and session taglibs, I'd like to update the "Requirements" >section of their documentation, which is not quite accurate.  It currently reads:

Those sound like good addtions for a 1.1 version of the request and session tag libraries.

+1

Thanks Morgan!

Glenn

----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

Re: taglibs contribution

Posted by Marius Scurtescu <ma...@multiactive.com>.
Hi,

I would like to make a few small observations regarding the
request, response, session, application and page tag 
libraries.

1. These libraries are created around the implicit variables
available in JSP pages. There are  four more such variables
defined in JSP 1.1: out, config, page (the page itself) and
exception (in error pages only). Would it make sense to
have tags for these objects?

2. In many cases if you need one of these libraries it is
quite likely that you will need another one from this set. 
It may make sense to consolidate all of them into one single 
taglib.

3. There are a few entities that are crossing these libraries
and could be treated on their own:
- attributes (in request, session, application and page)
- init parameter (in application and possibly config)
- cookies (in request and response)
- session (in request and session)
It may make sense to have tags for these entities and
the scope to be specified as an attribute.

4. In most cases when a parameter or attribute is retrieved
it ends up in the generated HTML page as is. In these cases
you should make sure that this content is HTML escaped first.
In order to do this you would either need to use another tag
to do the escaping or instruct the parameter or attribute
tag to escape its content. For example:

<esc:html><req:parameter name="address1"/></esc:html>
vs.
<req:parameter name="address1" escape="html"/>

I can imagine three types of escaping (I run into these):
HTML, JavaScript and XML, but I am sure that there are more.

What do you think?

Regards,
Marius

> mdelagra@us.britannica.com wrote:
> 
> Hi all,
> 
> I'd like to contribute two tag libraries (attached) to the project.  Jakarta currently has tag libraries for only two of the four
> JSP scopes, request and session.  I created tag libraries for the other two scopes.  Here's a complete list of the new tags:
> 
>   application taglib
>   ------------------
>   attribute
>   attributes
>   existsattribute
>   setattribute
>   removeattribute
>   equalsattribute     (new functionality)
>   initparameter       (new functionality)
>   initparameters      (new functionality)
>   existsinitparameter (new functionality)
>   equalsinitparameter (new functionality)
> 
>   page taglib
>   ------------------
>   attribute
>   attributes
>   existsattribute
>   setattribute
>   removeattribute
>   equalsattribute     (new functionality)
> 
> The tag libraries are code-complete and well-documented.
> 
> Later this week (or so :) I'd also like to submit some new tags for the request and session taglibs.  The tags themselves are
> done, but I'm still working on the javadocs for them, and then I'll have to create diff files against the current documentation.
> Here are the tags I'd like to add:
> 
>   request taglib
>   ------------------
>   equalsattribute
>   equalscookie
>   equalsheader
>   equalsparameter
> 
>   session taglib
>   ------------------
>   equalsattribute
> 
> When I submit my updates to the request and session taglibs, I'd like to update the "Requirements" section of their documentation,
> which is not quite accurate.  It currently reads:
> 
> >  This custom tag library requires no software other than a servlet
> >  container that supports the JavaServer Pages Specification, version 1.1.
> 
> I think this is a more accurate requirement:
> 
> >  This custom tag library requires no software other than a servlet
> >  container that supports the JavaServer Pages Specification, version 1.2.
> >
> >  The tag library also works in some JSP version 1.1 servlet containers,
> >  such as Tomcat, but not in others, such as Weblogic. The tags in this
> >  tag library are designed according to the JSP 1.2 specification, which
> >  makes this requirement of the <jsp:getProperty ... /> tag:
> >
> >    The value of the name attribute in jsp:setProperty and
> >    jsp:getProperty will refer to an object that is obtained from the
> >    pageContext object through its findAttribute() method.
> >
> >  The JSP 1.1 specification does not require this behaviour, and while
> >  Tomcat happens to support it, Weblogic does not. Note that it is fairly
> >  straightforward to write a custom tag that emulates this behaviour for
> >  Weblogic users. Sample source code for such a tag can be found here.
> 
> If you compare the JSP 1.1 and JSP 1.2 specification, I think you'll find that this statement is accurate.
> 
> Well, I think these are pretty useful tags.  Let me know if you will take them!
> 
> - Morgan Delagrange
> 
> 
> 
>                   Name: taglibs.jar
>    taglibs.jar    Type: Java Archive (application/java-archive)
>               Encoding: base64

-- 
------------------
Marius Scurtescu, Software Engineer
Tel: (604) 899-2835 Fax: (604) 899-2899
mailto:marius@multiactive.com
Multiactive Software Inc. http://www.multiactive.com
------------------
Attract and retain customers with Multiactive Software --
proud winners of PC WEEK's "Best of COMDEX" award.
------------------