|
Vani Kadur<br />==========<br />SCJP(98%)<br />SCWCD(85%)<br />IBM Certified Developer - XML and Related Technologies.
Sun Certified Web Component Developer 1.4<br />Linux LPI Certified (LPIC-1)<br />Sun Certified Java Programmer 1.4
Originally posted by Vani Kadur:
Only the include directive adds static content in a JSP.
Originally posted by Rafael Pereira:
Well, from one point of view, HFS is not wrong.
<jsp:include> can really be used to include static content in a page!
Originally posted by Rafael Pereira:
Which are the other options?
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Originally posted by Paul Bourdeaux:
I have never tried to configure a mapping with that kind of url pattern, but I assume it will work
Originally posted by Paul Bourdeaux:
However, I think that the mock exam assumes that no extravagant mapping has taken place,
Originally posted by Paul Bourdeaux:
... have them add a clause like
---------
C. <jsp:include page="/segments/footer.html" /> (Assume that /segments/footer.html is a valid html page and no url remapping has taken place)
---------
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
>Reporter: Paul Bourdeaux
> Email: pbourdeaux@cait.org
> Title: Head First Servlets and JSP
> Page: 810
> Location: Answer to Question 22
> Severity: serious technical mistake
>
> ======================= Description =======================
>
> [810] Answer to Question 22;
> Answer C is incorrectly marked as a right answer. According to the
> JSP 2.0 Specs, section 5.4 page 1-109, the included object is
> "likely a static object, but it could be mapped ito, for instance,
> a servlet via web.xml." There is no way to tell if
> /segments/footer.html is static or dynamic, therefore Answer C is
> incorrect.
>
> The only correct answer is Answer A.
Date: Sun, 1 May 2005 13:04:28 -0700 (PDT)
From: Bryan Basham
No errata.
This question is not meant to make the reader challenge whether
the URL "/segments/footer.html" is truly static or if it has
been mapped to some servlet. That is not the point of the
question. The point is whether the include directive *as well as* the
include action can include static content. The answer is "yes, they
both permit static content", so both A & C are valid options.
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Kejal<br />SaneDevil@gmail.com
This will take every ounce of my mental strength! All for a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|