Jerry Bustamente

Ranch Hand
+ Follow
since May 24, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Jerry Bustamente

Does anyone know if there is an electronic version of the book and if it has a corrected diagram?

Thanks,

Jerry B.
Congratulations!

Good for you.

:-)

JerryB
11 years ago
Page 94. steps 5 and 6

"The order of creation is wrong (and inconsistent with the order as present later in the book):
The EJBObject is created BEFORE the bean is created.
Steps 5 and 6 are really 3 steps:
Now the services kick in and
5: the EJBObject is created
6: the bean is created
6b: the EJBObject stub is returned to the client."

This is easy to understand but modifying the diagram is not. Is there by any chance there could be a correct e-copy of the corrected diagram that can be printed off? What I do is print off all the errata then transfer it to the hardcopy (the book) and work from there. Given the fundamental importance of the diagram (and the general power of diagrams) I think a corrected diagram would be most useful.

Thanks,

JerryB
Thank you very much for your kind reply. I understand now.

Sincerely,

Jerry B.
Greetings,

I found this mock exam question and do not understand the answer.

Can anyone help me understand? I've been staring at this for a while and just can't figure it out.

Question:

Given four JSP files arranged in the following directory hierarchy, identify the correct action that should be defined in acme/detonate.jsp to display 'click' when coyote.jsp is requested.

coyote.jsp
dynamite.jsp
acme/detonate.jsp
acme/dynamite.jsp
coyote.jsp contains <%@ include file="acme/detonate.jsp %>
dynamite.jsp contains boom!!!
acme/dynamite.jsp contains click

Possible answers:

1 <jsp:include page="dynamite.jsp"/>
2 <jsp:include page="acme/dynamite.jsp"/>
3 <jsp:include page="../dynamite.jsp"/>
4 <jsp:include file="dynamite.jsp" />

Answer 2 is correct because the page attribute in the jsp:include action is interpreted relative to the current JSP page, that is coyote.jsp since detonate.jsp is included at translation-time of coyote.jsp. Therefore the dynamite.jsp located in the acme directory is required by coyote.jsp to display 'click'.

Answer 1 is incorrect because coyote.jsp would include the file dynamite.jsp from the same directory which would display 'boom!!!'. Answer 3 is incorrect because coyote.jsp would attempt to include dynamite.jsp from its parent directory which does not exist. Answer 4 is incorrect because jsp:include is incorrectly defined. The file atttribute is not supported by this action.

Thanks much.

Sincerely,

Jerry B.
If a page is buffered and jsp:include is executed with flush=true, the buffer is flushed prior to the inclusion of the included resource.

But what happens when a page is not buffered and jsp:include is executed with flush=true?

Is the buffer flush executed anyway? Is an illegalStateException thrown?

Thanks for your help.

Sincerely,

Jerry Bustamente
Thank you very much for taking the time for your kind reply. It is now clear.

Sincerely,

Jerry Bustamente
I would appreciate some help.

On page 446 of HFSP in the BANG box at the bottom of the page it states that the target attribute, "... needs to resolve to the REAL THING. That means an EL expression or a scripting expression (<%= %> , ...".

I understand how an EL expression can be a "REAL THING" but not how
<%= %> can evalute to a "REAL THING".

Can someone help me understand?

Thank you.

Sincerely,

Jerry B.
I would like to ask for more clarification.

As a result of the example below would it be accurate to say that getContextPath()always returns the directory structure up to the directory that contains the resource?

Thank you.

Sincerely,

Jerry B.

getContextPath() returns the context portion of the request uri. So a call to getContextPath() in index.jsp with the url, http://<m/c> ort/web_app/jsp/index.jsp would return /web_app/jsp.
12 years ago
Sorry but still a little confused.

Page 597 of Head First Servlets & JSP has a list of Normal JSP page syntax and JSP document syntax.

The Normal JSP page syntax does not list anything like <jsp:....

Is this an omission in the book?

Thank you both for taking the time to answer my questions.

Sincerely.

JerryB
I need clarification on what the difference is between a Jsp Document and a Jsp Page.

Here is my confusion. On the Sun practice cert exam a question reads:

"Which two tags can be used to insert Java code to be executed by a JSP page?"

The answers are <% %> and <jsp:scriplet> </jsp:scriplet>

Then a later question states that <% int i=12; %> is not valid in a JSP Document, not JSP page.

Is there a difference between a JSP Document and JSP Page?

Thanks,

JerryB
Thank you Sai!

sincerely,

Gerald Bustamente
Greetings.

I cannot decipher how the following:

<bobtag: example="The ${'${'}jim} is an EL expression">

prints:

"The ${jim} is an EL expression"

I know it has something to do with escape sequences but I cannot figure it out.

Any help is greatly appreciated. I take test in 15 days.

Sincerely,

Gerald Bustamente
Muhammad,

Thank you so much for your considerate reply. I understand now.

Sincerely,

Jerry Bustamente