• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[JSP 2.0] Final Version errors. Part 2.

 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
Look at page 1-66 [EXPRESSION LANGUAGE] :
a)
header - a Map that maps header names to a single String header value (obtained
by calling ServletRequest.getHeader(String name))
ServletRequest does *not* know anything about headers, because they are HTTP-specific part of request, and all headers-related stuff exists in HttpServletRequest.
b)
headerValues - a Map that maps header names to a String[] of all values for
that header (obtained by calling ServletRequest.getHeaders(String))
i. see comment a)
ii. even getHeaders from HttpServletRequest does not return array of String, it returns Enumeration of String.
Cheers !!!
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey! Can't afford to buy a book for SCBCD ?
Try this !

I thought there are no books for SCBCD out yet
Anyway, it looks great!
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, have you sent a note to jsr-152-comments@jcp.org ?
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:

I thought there are no books for SCBCD out yet
Anyway, it looks great!

Oh, man !!!
The first [and the best] book for SCBCD is Head First EJB (guess, who wrote it ? sure, you know them : Kathy Sierra with Bert Bates !), and it was published in October 2003.
cheers !
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:
By the way, have you sent a note to jsr-152-comments@jcp.org ?

I have sent to 'jsp-spec-comments@eng.sun.com', as written on the 1-st page.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI...
Here are some other errata I have sent to the JSP spec team
xxxii: Web Applications, 7th bullet: "technology" should read
"technologies" since there are two technologies mentioned
1-10: JSP.1.3.2, Directives: "independent" should read "independently"
1-10: JSP.1.3.2, Actions: "An Actions" should read "An Action"
1-13: JSP.1.3.6, 5th par: <myTag:formatBody> is nowhere to be found in
the example that follow (<myTag:tagWithBody> instead)
1-41: JSP.1.8.3, Table JSP.1-6, application:
"getServletConfig().getContext()" should read
"getServletConfig().getServletContext()"
1-49: JSP.1.10.1, Table JSP.1-8, pageEncoding, 5th line: "attriute"
should read "attribute"
1-63: JSP.2, 2nd par: "tag handers" should read "tag handlers"
1-102: JSP.5.1, Semantics, bullet 7: "... is associated the with the..."
should read "... is associated with the..."
1-103: JSP.5.1, Examples: "... given the local name wombat with
WombatType..." should read "...given the local name wombat with
my.WombatType..."
1-106: JSP.5.2, Examples: "The following two elemenst..." should read
"The following two elements..."
1-117: JSP.5.10, 2nd par: "... whitespace appearning..." should read
"...whitespace appearing..."
1-151: JSP.7.1.2, 3rd par: "The page that is parsed is as expanded..."
should read "The page that is parsed is expanded..."
1-157: JSP.7.1.7.6, 3rd par: "... if it were a Tag instace" should read
"if it were a Tag instance"
2-49: JSP.13, 5th par: The closing element </foo> should read </x:foo>
instead
2-49: JSP.13, 6th par: The closing element </x:foo/> should read </x:foo>
instead
2-51: JSP.13.1, Tag Handler as a Container-Managed Object, 2nd par: "a
container may implementing" should read "a container may implement"
2-60: JSP.13.1.3, Empty and Non-Empty Action, 2nd par: "... and on if the
custom action..." should read "... and on whether the custom action..."
2-72: JSP.13.2.2.2, 2nd par: "The BodyContent object passed will have not
data on it" should read "The BodyContent object passed will not have data on
it"
2-72: JSP.13.2.2.2, 3rd par: "at which case" should read "in which case"
2-77: JSP.13.4, line 1: "boolean b1, b2" should read "int b1, b2" since
the methods do*Tag() returns ints and not booleans
2-77: JSP.13.4, lines 3 and 4: The declaration "Tag d" appears twice,
this will not compile as one block cannot declare two variables having the
same name.
2-79: JSP.13.5, 2nd par: "... needs to be access by..." should read "...
needs to be accessed by ..."
2-79: JSP.13.5, 3rd par: element <x:bar ref="myObjet" /> should read
<x:bar ref="myObject" />
2-85: JSP.13.6.2.2, method findAncestorWithClass, 2nd par: "TagAdpater"
should read "TagAdapter"
2-96: JSP.13.8: Comment "//Step T.6 - Inovke doTag" should read "//Step
T.6 - Invoke doTag"
2-96: JSP.13.8, Generated Simple Tag Handler (MySimpleTag.java): Method
declaration "public void setX(Stirng x)" should read "public void
setX(String x)"
2-99: JSP.13.9, Scripting Variables, 1st par: "... so thex can used
in..." should read "... so they can be used in..."
2-112: JSP.13.9.5.2: "Recall tht" should read "Recall that"
2-113: JSP.13.9.6, 1st par: "... elements as beloning to..." should read
"...elements as belonging to..."
2-129: JSP.14.1.1.2, method parseExpression: "Prepare an expression..."
should read "Prepares an expression..." as the third person should be
usually used in documentation
2-134: JSP.14.3, 2nd catch block: "ElException e" should read
"ELException e"
3-5: JSP.A.3, method _jspService(): A space is missing between the type
and the identifier of each local variable.
 
Mehdi Chaouachi
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

b) headerValues - a Map that maps header names to a String[] of all values for
that header (obtained by calling ServletRequest.getHeaders(String))
i. see comment a)
ii. even getHeaders from HttpServletRequest does not return array of String, it returns Enumeration of String.

So to clear the doubt the headerValues map returns an array of strings or an enumeration?
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mehdi Chaouachi:

So to clear the doubt the headerValues map returns an array of strings or an enumeration?

well, for (b.ii) I was wrong.
Look at the note from SUN :

Hi Mikalai,
I agree with (a). We'll fix this in the next version of the specification.
As for (b), I agree with (i), but not with (ii). Though
HttpServletRequest.getHeaders() returns an Enumeration, the EL still
does expose it as a String[] to the page. The data for that String[] is
obtained by calling getHeader() so this is correct.
Thanks much for your feedback!
---
Mark Roth, Java Software
JSP 2.0 Co-Specification Lead
Sun Microsystems, Inc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic