Philippe Maquet

Bartender
+ Follow
since Jun 02, 2003
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
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Philippe Maquet

Hi Vanniarajan,

Good catch!

What you signals is confirmed by Kathy in this thread:

2) Be the Container in chapter 8, the third example will not work for the same reason that the first example doesn't work--because the attribute is at Request Scope, and the default scope is Page scope.



Best regards,

Phil.

PS: What about you to mention it in the Head First Servlets & JSP errata page? (It is not yet). Posting there is the best way to help the authors to improve the next print of that great book!
[ September 25, 2004: Message edited by: Philippe Maquet ]
Hi Pallavi,

I've not the time right now to make a test, but what's I noticed is that your web.xml file references the wrong (old) 2.3 DTD, while it should reference the new schema (xsd) for version 2.4). An example of it is given on page 77 of Head First Servlet & JSP.

Regards,

Phil.

PS: BTW, your code excerpts would be easier to read if they where formatted with the UBB 'CODE' tag.

OK - Let me put it more clearly; In the test - if I see the phrase "init-parameters" - should I ALWAYS think of this a servlet-init-parameters - unless - of course - otherwise stated?


As the co-authors of the book also are co-authors of the real exam, I'd be really confident in all warnings they can write about the real exam...

Regards,

Phil.
Hi Henrik,

I'm not sure to understand your question. What's stated on page 161 is that "if you see "init parameters" without knowing if it means servlet or context init parameter, assume servlet."

I don't see any contradiction with previous pages.

Regards,

Phil.
Hi Henrik,

Is that totally op to the container to decide ? - or is the servlet destroyed when the final thead is dead?


In the servlet's life cycle, one separate thread == one request and the servlet keeps alive till either the web app is redeployed or the web container shuts down. I suggest you to read HFS from page 101 and the next few ones.

Regards,

Phil.
Hi Andrew,

I feel sincerely sorry to hear that... And you were *so* close to pass!

Fortunately, I have been given a second chance and this time I will succeed.


Of course you will!

Good luck,

Phil.
Hi Andrew,

Sorry, but I was interrupted during preparing the previous post, so didn't see yours when I posted mine. But both links are the same, of course!

Regards,

Phil.
The best place to submit errata for the book itself is this Head First Servlets & JSP page.
By doing so, you'll help the authors to even improve the next print.
Thank you all for doing that.
[ September 24, 2004: Message edited by: Philippe Maquet ]
Hi Pallavi,

Nothing else. You simply work with Tomcat 5 instead of Tomcat 4. If my memory doesn't betray me, you still need to install JSTL separately though, but not to get EL to work (it's built in JSP 2.0), just JSTL.

Someone else will clarify this here soon, hopefully...

Regards,

Phil.
Hi Balaji,

Welcome to JavaRanch and this forum!

Joyce already answered - and very well - to your question, only letting me the "dirty" work...

Maybe you didn't notice our Naming Policy when you registered. Could you please change your displayed name to meet it? You can change it here. Thank you in advance.

Best regards,

Phil.
Hi Anton,

I think that passing *copies* of the cached records to the presentation layer totally makes sense. So you're OK IMO, but it's only my opinion of course.

Regards,

Phil.
Hi Pallavi,

EL belongs to the JSP 2.0 specs, which requires Tomcat 5 (J2EE 1.4), not Tomcat 4 (J2EE 1.3).

Regards,

Phil.
Hi Neeraj,

My current project is with servlets/jsp...


That's great news then, because you should know half the exam contents already.
You'll probably have to mainly focus on the new stuff (especially JSP 2.0: SimpleTag model, tag files, Expression Language, ...).

Kathy & Bert have an effective writing style .. lot of credit should go to Kathy Sierra & Bert Bates for my scjp..It is especially helpful for people who are working..

I hope I feel the same for HFS.


If you enjoyed their writing style in Sun Certified Programmer & Developer for Java 2 Study Guide (Exam 310-035 & 310-027) as I did myself, you should enjoy their Head First series even *more*... (I know it's difficult to believe, but well... you'll see it by yourself ).

Regards,

Phil.
[ September 24, 2004: Message edited by: Philippe Maquet ]
Hi Neeraj,

As you don't tell us whether your current experience is or not about Servlet/JSP, it's difficult to reply your question...

But as you chose Head First Servlet/JSP for your preparation, you're in the best possible hands anyway.

Here's how I'd proceed:
  • Start reading the book once. Contrary to most technical books, and as all other books in the Head First series, you'll see that this one is very pleasant and funny to read. You'll be "studying" of course, but without even being aware you are doing... It's like a magic!
  • While reading, you could take quick notes of all the topics to which *you* think you should come back later (simply putting page numbers on paper, writing short summaries, etc.).
  • At the end of that first reading, you *will* be surprised of how much you know already: "brain-friendly" is no Head First marketing slogan: it's a *reality* as far Head First books are concerned.
  • Then you could spend the *little* time needed to review what you noted in 2) above.
  • And finally, you should end with the final mock exam printed at the end of the book. And if you get a reasonable score on it, simply go to the exam in total confidence: you'll get a *high* score on the real exam, because the mock one is *much* more difficult (on purpose).


  • Good luck for your prep, and enjoy reading!

    Regards,

    Phil.
    [ September 23, 2004: Message edited by: Philippe Maquet ]
    Hi Andrew,

    And if you do implement a timeout, you will have to change the comments above the lock method to indicate that it will timeout - which to me seems to indicate that you will not be implementing the method the way that Sun envisaged it.


    // Locks a record so that it can only be updated or deleted by this client.
    // Returned value is a cookie that must be used when the record is unlocked,
    // updated, or deleted. If the specified record is already locked by a different
    // client, the current thread gives up the CPU and consumes no CPU cycles until
    // the record is unlocked.


    I wonder whether some timeout on locking could make sense in the fat-client model, without breaking the instructions. Not a timeout on waiting for the record to be available for locking, but some timeout to avoid a client keeping a lock for ever.

    Of course the RMI lease renewal can be used for the same purpose (unlock locks hold by crashed clients through Unreferenced), but as OOH the default RMI lease value is 10 minutes (a little long to hold a lock, right?) and OTOH the RMI FAQ explains that:

    The client will renew each lease when it is halfway expired. If the lease interval is too short, the client will waste a lot of network bandwidth needlessly renewing its lease. If the lease interval is much too short, the client will be unable to renew the lease in time, and the exported object may be deleted as a result.

    , some locking-specific additional timeout mechanism seems at least to be defendable.

    I started this by "I wonder" on purpose, so take this more as a question than any assertion of mine.

    Best regards,

    Phil.
    [ September 23, 2004: Message edited by: Philippe Maquet ]