Catalogue | Your Order | Delivery | Contact Us | Exam Centre |
---|
This errata page concerns:
If you believe you have seen an error in the book which is not listed below, please contact us so the author can review and publish the correction below if required.
Last updated: 19th January 2013
Page | Location | Error | Correction | Comments |
---|---|---|---|---|
xii | Line 3 | These are given in | These can be found online at Oracle's website. | Appendix A was removed in the 3rd Edition for compactness |
29 | Lines 3-5 | the | the server has to manage applications in a 'sandbox'. On the server, these sandboxes are called containers. | Minor re-wording |
82 | Q.9-10 | [No typographical/content error] | [No correction] | Question number boxes need re-aligning |
85 | Q.9 Exhibit | resp.getWriter().write(title) | [No correction] | One reader has questioned that this should throw a NullPointerException; however, Java 7 API documentation for PrintWriter.write(String) states: If the argument is null then the string "null" is printed. This question is correct as written. |
132 | Line 1 | thrown (see page | thrown (see page 104) | Page mis-reference |
187 | 8th line from end | ubiquitous "Hello World!" | Minor spelling typo | |
188 | Line 5 | [Remove line entirely] | Does not compile as flushBuffer() throws a checked IOException, but is not essential to the example. Note Line 4 is fine as PrintWriter.write() does not throw any checked exceptions. | |
200 | Q.3, Option C | ServletRequest. | ServletRequest.startAsync() | By far the most reported error! |
267 | 5th line from end | resp.sendError(HttpServletResponse. SC_REQUEST_ENTITY_TOO_LARGE); | [Remove the bold typeface] | Minor formatting error |
267 | 3rd line from end | } | } catch(Exception e) {} | The extra catch clause is required as req.getPart("file1") throws checked IOException and ServletException |
268 | Line 8 | if("yes".equals(req.getParameter("inspect")) { | if("yes".equals(req.getParameter("inspect"))) { | Single missing ) |
287 | Printed line 12 of full code example | EnumSet<DispatcherType> types = new EnumSet<DispatcherType | EnumSet<DispatcherType> types = new EnumSet<DispatcherType()>; | Single character typo |
290 | Q.4 | (choose | (choose two) | |
291 | Q.5 | (choose | (choose three) | |
291 | Q.6 | (choose | (choose one) | |
291 | Q.7 | (choose | (choose two) | |
291 | Q.8 | (choose | (choose two) | |
293 | Q.16 | (choose | (choose two) | |
293 | Q.16, Option C | setInitParam(String,String) | setInitParameter(String,String) | Worth noting that annotations and deployment descriptors use the "param" abbreviation, but the API method is the full word "parameter" - great for consistency! |
295 | Q.3 | Correct answers: B, | Correct answers: B,C | The text comment is correct |
311 | Line 1 | em. | em.createQuery( | |
311 | Line 8 | Writer w = resp.getWriter(); | PrintWriter w = resp.getWriter(); | Needed so the print() method in the next line is available. |
311 | Line 11 | item.calculatePrice(4.5) | item.calculatePrice(4.5f) | 4.5 will be double by default; float is needed |
316 | Q.11 | (choose | (choose three) | |
317 | Q.12 | (choose | (choose three) |