This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.

Amit Prakash Singh

Ranch Hand
+ Follow
since May 11, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Amit Prakash Singh

Only Page directive is not available to a tag file. Rest of them are available to a tag file

in tag file , attribute having the page scope but in calling page , attribute has the tag scope? it is right??



Very much intutive and very much correct. in the page where tag has been invoked, attribute would be having the tag scope only. And in the tag file itself the attribute would be having the page scope.
TAG File

Hi their are jsp oBody and jsp:invoke available for tag file. Please follow the link, I found it very much useful for the tag file. Tag file is not covered perfectly in HFSJ .

Thanks ranchers. So classic tag can have scripting elements in their body. Am I right?




Yes sir, you are right!!!
chapter 10 : part : What exactly IS a JspFragment?

Please see in this part mentioned it has been mentioned that "The crucial thing you must remember about JspFragment is that it
must NOT contain any scripting elements"

Now, with body-content = "JSP" , everything written in a JSP is valid for the body of tag including scriptlet. So we can not use body-content = "JSP" for the simple tag.
Hey I found that chapter pretty much interesting...I think you should give it a next try...or better just few page from last...there is a listing of all the patterns with pros and cons....it is complete reference for all the patterns.
Hi,

synchronizing the service method kills the concurrency. So no other thread can run at the same time for the same servlet instance. However, I would like to add one note here :

If you are using STM for the synchronization, then, how your container vendor has implemetend the STM is important. Either a single servlet instance and make a queue for each request. Or multiple instance of the servlet and each handling the request seperately. Read Chap5 of HFSJ.
Hello!!!

My explanation is simple : what all implicit objects are available to a jsp page?

out, request, response, session, config, application, pagecontext, page and exception

right???

now see, session is already made available to you by default by the conatiner.

when you called the request.getSession(false) : it gives you the session as it is available.

if you want to turn off implicit session, use this:

<%@ page import="" session="false" %>

let me know if there is any confusion
what about the fact that . dot operator can not be used with the list and array. In both D & F, . is being used for accessing something from the list.
reason why this will not throw exception is, a implicit session object is available to the jsp by default. So second time when your code calls for the getSession(false), there will be a session available.

look at the container generated java file for your jsp, you will find conatiner has already called the getSession.

tricky question!!! if you set the session to be not available, by setting session="fales" in the page directive then it will throw error.
Hi Chintu,

Current price for the voucher is 6000 at any NIIT prometric centre and it will be 8000 by Aug 1, as informed by the centre coordinator to me.
Thanks to all dear ranchers for their wishes. Here is my little story on the preparation.

Initially I used the Head first servlet and jsp 1.4, later on switched to 1.5 version. Read it completely for 2 times first. Then I started taking the various online mock test, (note: not the one given in book) like marcus green's emulator etc.

Then I used Javaranch to have the experience of the fellow ranchers, and almost everyone suggested to look at the APIs, EL, design pattern and tags. Thats very much true when you give the exam. Straight forward questions are very less and mostly the scenario based question (like if you are developing a website and you caught up in a particular scenario.)

Downloaded the APIs from sun docs, JSTL specification pdf and Peabody's design pattern notes. Used all of them regulerly. Meanwhile I used my own coding to resolve any doubt and used Javaranch to get helping hands as well.

Finally, a day came when I muster up the courage to give the HFSJ1.5 mock exam, and was right at the crossing line. After nearly 10 days of that mock exam I gave my certification.

Tips:
1. follow the directions of HFSJ word by word (if they say in jstl chapter to download the specification, do it )
2. Know servlet and related API by heart.
3. Must do 1.4 version mock exam.

Thanks
Thanks to all fellow ranchers. Its been a nice learning path for me for last couple of months. HFSJ rocks.