Re: Problem with empty key word on a collection.

2003-02-14 Thread James Cook

On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:


The change that Jeff is proposing, although of interest, would
unfortunately break compatibility with the spec.
(sorry guys, but the Expert Group ain't perfect)



Why would extending the empty keyword to support Collections break 
compatibility with the spec?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with empty key word on a collection.

2003-02-14 Thread O'brien, Tim
 -Original Message-
 From: James Cook [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, February 14, 2003 8:17 AM
 To: Tag Libraries Users List
 Subject: Re: Problem with empty key word on a collection.
 
 
 
 On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:
 
  The change that Jeff is proposing, although of interest, would 
  unfortunately break compatibility with the spec. (sorry 
 guys, but the 
  Expert Group ain't perfect)
 
 
 Why would extending the empty keyword to support Collections break 
 compatibility with the spec?
 

Modifying the empty keyword to support Collections doesn't break anything
per se, but it does exceed the definition of empty in Section A.3.8 in the
JSTL 1.0 specification.  I believe that the JSPA talks about adhering to the
spec in independent implementations of a JSR.  

I'm very uninterested in starting a flamewar about JCP, but it is important
to note that adhering to the spec allows for portability over multiple
implementations of JSTL and EL.

I've already submitted a patch to commons-jexl to make empty work with
Collection, but it won't be of any help to anyone using the current Standard
Taglib and JSTL 1.0.  I think this is what the nascent Unstandard Taglib
what meant for, providing functionality for little bits of functionality
that might have been inadvertently overlooked by the first rev of JSTL in a
way that doesn't conflict with existing JCP specs.  


Tim O'Brien 


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problem with empty key word on a collection.

2003-02-14 Thread Jerome Jacobsen
I'll bite.  What's the Unstandard Taglib?  Is there a website for this?

 -Original Message-
 From: O'brien, Tim [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 14, 2003 11:45 AM
 To: 'Tag Libraries Users List'
 Subject: RE: Problem with empty key word on a collection.
 
 
  -Original Message-
  From: James Cook [mailto:[EMAIL PROTECTED]] 
  Sent: Friday, February 14, 2003 8:17 AM
  To: Tag Libraries Users List
  Subject: Re: Problem with empty key word on a collection.
  
  
  
  On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:
  
   The change that Jeff is proposing, although of interest, would 
   unfortunately break compatibility with the spec. (sorry 
  guys, but the 
   Expert Group ain't perfect)
  
  
  Why would extending the empty keyword to support Collections break 
  compatibility with the spec?
  
 
 Modifying the empty keyword to support Collections doesn't 
 break anything
 per se, but it does exceed the definition of empty in Section 
 A.3.8 in the
 JSTL 1.0 specification.  I believe that the JSPA talks about 
 adhering to the
 spec in independent implementations of a JSR.  
 
 I'm very uninterested in starting a flamewar about JCP, but it is 
 important
 to note that adhering to the spec allows for portability over multiple
 implementations of JSTL and EL.
 
 I've already submitted a patch to commons-jexl to make empty work with
 Collection, but it won't be of any help to anyone using the 
 current Standard
 Taglib and JSTL 1.0.  I think this is what the nascent Unstandard Taglib
 what meant for, providing functionality for little bits of functionality
 that might have been inadvertently overlooked by the first rev of 
 JSTL in a
 way that doesn't conflict with existing JCP specs.  
 
 
 Tim O'Brien 
 
 
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problem with empty key word on a collection.

2003-02-14 Thread Henri Yandell

It's mainly a set of ideas at the moment. People come to this list a lot
asking for features in JSTL. Rather than send them away unsatisified, the
idea is to implement them in the Unstandard taglib and have happy users.

Additionally, it would provide an interesting research ground for the JSTL
people and provide some way in which Users can really force home the fact
that the c:systemExit/ tag is essential.

We set things up for it last week, the developer list has a chunk about it
in the mail archives. Tim's put a bit of code in there and Glenn and I
have setup the infrastructure for it, but I'm focusing on String 1.0.1
first at the moment.

Website to come.

Hen

On Fri, 14 Feb 2003, Jerome Jacobsen wrote:

 I'll bite.  What's the Unstandard Taglib?  Is there a website for this?

  -Original Message-
  From: O'brien, Tim [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 14, 2003 11:45 AM
  To: 'Tag Libraries Users List'
  Subject: RE: Problem with empty key word on a collection.
 
 
   -Original Message-
   From: James Cook [mailto:[EMAIL PROTECTED]]
   Sent: Friday, February 14, 2003 8:17 AM
   To: Tag Libraries Users List
   Subject: Re: Problem with empty key word on a collection.
  
  
  
   On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:
  
The change that Jeff is proposing, although of interest, would
unfortunately break compatibility with the spec. (sorry
   guys, but the
Expert Group ain't perfect)
   
  
   Why would extending the empty keyword to support Collections break
   compatibility with the spec?
  
 
  Modifying the empty keyword to support Collections doesn't
  break anything
  per se, but it does exceed the definition of empty in Section
  A.3.8 in the
  JSTL 1.0 specification.  I believe that the JSPA talks about
  adhering to the
  spec in independent implementations of a JSR.
 
  I'm very uninterested in starting a flamewar about JCP, but it is
  important
  to note that adhering to the spec allows for portability over multiple
  implementations of JSTL and EL.
 
  I've already submitted a patch to commons-jexl to make empty work with
  Collection, but it won't be of any help to anyone using the
  current Standard
  Taglib and JSTL 1.0.  I think this is what the nascent Unstandard Taglib
  what meant for, providing functionality for little bits of functionality
  that might have been inadvertently overlooked by the first rev of
  JSTL in a
  way that doesn't conflict with existing JCP specs.
 
  
  Tim O'Brien
 
 
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem with empty key word on a collection.

2003-02-14 Thread Timothy Kettering

Not surprised at that - a prior company I worked at, where I first 
learned Java, they had consultants and (i thought..) smart engineers 
working together to develop a quite large web application.  The company 
folded a year later, and I moved on.  It wasn't till after I got into 
jsp/servlets that I realized that they had horribly mangled the MVC.. 
namely they wrote the entire thing in a couple massive behemoth JSP 
page and not a single servlet in sight.  I remember one particular .jsp 
being over 4000 lines.

I've since come to the conclusion that so-called consultants get their 
$150/hr jobs either by being experts, or by sheer incompetence.  Which 
happens more often, I don't know.  :)


On Friday, February 14, 2003, at 01:33 PM, O'brien, Tim wrote:



You might laugh at this, but I've worked with high priced consultants 
from
well respected companies who always managed to do something like
System.exit(0); in a Servlet.  :-)  Or, better yet, the certified web
developer from a 3-letter acronym company (not IBM) who liked to 
write all
content to a temporary file before sending it back to the client.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem with empty key word on a collection.

2003-02-13 Thread Shawn Bayern
On Thu, 13 Feb 2003, Leon Doud wrote:

 It appears that the empty keyword doesn't always
 function on a collection.  I must be missing something
 obvious..
 
 The folder object contains a collection of content. 
 The useBean tag isn't initializing the Folder object.
 Its there so I can use scriptlet debugging code. 
 
 What exactly does empty check to determine if a collection is empty or
 not?  It looks like that empty is checking if the folder.content is
 null or not, not if its size is zero.
 
 Folder.getContent() returns a type of java.util.Collection.

The 'empty' operator is specified to work with java.util.List and
java.util.Map (as well as arrays and strings), not java.util.Collection in
general.

-- 
Shawn Bayern
JSTL in Action   http://www.manning.com/bayern


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problem with empty key word on a collection.

2003-02-13 Thread Jerome Jacobsen
Wow.  That is extremely unintuitive.  Why not work on a Collection (which
automatically gives you List)?

 -Original Message-
 From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 13, 2003 11:13 AM
 To: Tag Libraries Users List
 Subject: Re: Problem with empty key word on a collection.


 On Thu, 13 Feb 2003, Leon Doud wrote:

  It appears that the empty keyword doesn't always
  function on a collection.  I must be missing something
  obvious..
 
  The folder object contains a collection of content.
  The useBean tag isn't initializing the Folder object.
  Its there so I can use scriptlet debugging code.
 
  What exactly does empty check to determine if a collection is empty or
  not?  It looks like that empty is checking if the folder.content is
  null or not, not if its size is zero.
 
  Folder.getContent() returns a type of java.util.Collection.

 The 'empty' operator is specified to work with java.util.List and
 java.util.Map (as well as arrays and strings), not java.util.Collection in
 general.

 --
 Shawn Bayern
 JSTL in Action   http://www.manning.com/bayern


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem with empty key word on a collection.

2003-02-13 Thread Leon Doud
Well that would be fine if it was possible to call the
isEmpty() method on a collection.  But since empty is
a key word the parser has a problem with
collection.empty.  

Why not implement the empty keyword on all
collections?  The method isEmpty is available in the
Collection interface.  Was there some sort of argument
against that when the spec was defined?


--- Shawn Bayern [EMAIL PROTECTED] wrote:
 On Thu, 13 Feb 2003, Leon Doud wrote:
 
  It appears that the empty keyword doesn't always
  function on a collection.  I must be missing
 something
  obvious..
  
  The folder object contains a collection of
 content. 
  The useBean tag isn't initializing the Folder
 object.
  Its there so I can use scriptlet debugging code. 
  
  What exactly does empty check to determine if a
 collection is empty or
  not?  It looks like that empty is checking if
 the folder.content is
  null or not, not if its size is zero.
  
  Folder.getContent() returns a type of
 java.util.Collection.
 
 The 'empty' operator is specified to work with
 java.util.List and
 java.util.Map (as well as arrays and strings), not
 java.util.Collection in
 general.
 
 -- 
 Shawn Bayern
 JSTL in Action   http://www.manning.com/bayern
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem with empty key word on a collection.

2003-02-13 Thread Shawn Bayern
On Thu, 13 Feb 2003, Leon Doud wrote:

 Well that would be fine if it was possible to call the isEmpty()
 method on a collection.  But since empty is a key word the parser has
 a problem with collection.empty.

You could use ${collection[empty]}.

 Why not implement the empty keyword on all collections?  The method
 isEmpty is available in the Collection interface.  Was there some sort
 of argument against that when the spec was defined?

I believe so; I don't remember the details of the debate, but I think the
justification is that the EL doesn't deal with Collections in general in
any other situation.

-- 
Shawn Bayern
JSTL in Action   http://www.manning.com/bayern


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem with empty key word on a collection.

2003-02-13 Thread Leon Doud
Thanks!  I forgot about that syntax.

--- Shawn Bayern [EMAIL PROTECTED] wrote:
 On Thu, 13 Feb 2003, Leon Doud wrote:
 
  Well that would be fine if it was possible to call
 the isEmpty()
  method on a collection.  But since empty is a key
 word the parser has
  a problem with collection.empty.
 
 You could use ${collection[empty]}.


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problem with empty key word on a collection.

2003-02-13 Thread Schnitzer, Jeff
 From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
 
  Why not implement the empty keyword on all collections?  The method
  isEmpty is available in the Collection interface.  Was there some
sort
  of argument against that when the spec was defined?
 
 I believe so; I don't remember the details of the debate, but I think
the
 justification is that the EL doesn't deal with Collections in general
in
 any other situation.

??  I'm pretty sure I can do a forEach across a Collection.

This seems entirely inane.  Would someone patch the Jakarta
implementation to allow the empty operator on Collection?  We don't use
specifications, we use software.

Jeff

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problem with empty key word on a collection.

2003-02-13 Thread Henri Yandell


On Thu, 13 Feb 2003, Schnitzer, Jeff wrote:

  From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
 
   Why not implement the empty keyword on all collections?  The method
   isEmpty is available in the Collection interface.  Was there some
 sort
   of argument against that when the spec was defined?
 
  I believe so; I don't remember the details of the debate, but I think
 the
  justification is that the EL doesn't deal with Collections in general
 in
  any other situation.

 ??  I'm pretty sure I can do a forEach across a Collection.

 This seems entirely inane.  Would someone patch the Jakarta
 implementation to allow the empty operator on Collection?  We don't use
 specifications, we use software.

For Tomcat, I imagine the answer would be a flat no, but Jeff has a point
here. Standard Taglib isn't the RI anymore is it? Doesn't that come from
Sun?

So can't Standard Taglib add patches like this that are natural and
right?

Hen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Problem with empty key word on a collection.

2003-02-13 Thread Pierre Delisle


Henri Yandell wrote:


On Thu, 13 Feb 2003, Schnitzer, Jeff wrote:



From: Shawn Bayern [mailto:[EMAIL PROTECTED]]



Why not implement the empty keyword on all collections?  The method
isEmpty is available in the Collection interface.  Was there some



sort


of argument against that when the spec was defined?


I believe so; I don't remember the details of the debate, but I think


the


justification is that the EL doesn't deal with Collections in general


in


any other situation.


??  I'm pretty sure I can do a forEach across a Collection.

This seems entirely inane.  Would someone patch the Jakarta
implementation to allow the empty operator on Collection?  We don't use
specifications, we use software.



For Tomcat, I imagine the answer would be a flat no, but Jeff has a point
here. Standard Taglib isn't the RI anymore is it? Doesn't that come from
Sun?
For Tomcat, I imagine the answer would be a flat no, but Jeff has a point
here. Standard Taglib isn't the RI anymore is it? Doesn't that come from
Sun?


Correct. 'standard' is the basis for the RI shipped by Sun.


So can't Standard Taglib add patches like this that are natural and
right?


What is important to note is that 'standard' also ships as an
implementation of the JSTL specification. Because of this,
'standard' must therefore pass the TCK.

The change that Jeff is proposing, although of interest, would
unfortunately break compatibility with the spec.
(sorry guys, but the Expert Group ain't perfect)


Given that the EL is now moving from the JSTL spec to the
JSP spec, the best way to handle this would be for Jeff
to submit a comment to the JSP spec comments alias at
[EMAIL PROTECTED]

Hope this helps,

-- Pierre




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]