Pramod Shivale

Greenhorn
+ Follow
since Mar 26, 2008
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 Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pramod Shivale

This can be done by applying
style="height: 100%;"
to the components inside the panelGrid
12 years ago
JSF
same probelm with optimistic-lock="all"
I have made optimistic-lock="dirty" dynamic-update="true" for the entity in mapping file.

And the code to test this is:


I am excepting StaleObjectStateException but this code runs without any exception.
please provide some suggestions or code to test this.
[ November 25, 2008: Message edited by: Paul Sturrock ]
Hi,
I have just passed SCWCD 1.5 exam. I want to go for SCBCD, but I want to know whether I should go for EJB 2.0 or 3.0.
and do you need to know EJB 2.0 before you get started with 3.0?
Is there any book for SCBCD from Kathy seirra and Bert Bates?
It wasn't that difficult to score.
I studied for 2 months irregularly.
i.e. If you study regularly 1 month could be enough.
I took some online exams
here are the links:
http://www.javaprepare.com/scwd/quests/questions.html
http://www.certgear.com/products/preview/scwcd/index.html
http://www.javaranch.com/carl/scwcd/scwcd_mock_logo.jsp
I also downloaded [ ILLEGAL MATERIAL ]
Hope this helps.
13 years ago
Once again thanks to the authors of HFSJ!!!
13 years ago
This statement is incorrect. The userId attribute is optional, but when you do specify this attribute and its value in the tag, it requires the setter method in the tag handler class to set the value for this attribute.
if you are saying classic tags are thread safe, then why do you need to reset the variable in doStartTag? doesnt it mean that classic tags are not thread safe?
Need help regarding the question in HFJS 2nd Edition
This is a question from final mock exam on page 837 of HFJS 2nd Edition
Q. 19)
A Classic tag handler exists in legacy code. The author wrote a handler that evaluates its tag body hundred times, to be used in testing other tags that produce random content.
Given:
06. public class HundredTimesTag extends TagSupport {
07. private int iterationCount;
08.pricate int doTag() throws JspException {
09. iterationCount = 0;
10. return EVAL_BODY_INCLUDE;
11.}
12.
13.public int doAfterBody() throws JspException {
14. if(iterationCount < 100) {
15.iterationCount++;
16.return EVAL_BODY_AGAIN;
17.}else{
18.return SKIP_BODY;
19.}
20.}
21. }

What is incorrect about the code?

A. Tag handlers are not thread safe, so the iterationCount can become out of sync if multiple users are reaching the page at the same time.
B. The doAfterBody is never being called because it is not part of the tag handler lifecycle. The developer should have extended the IterationTagSupport class to include this method in the lifecycle.
C. The doTag method should be doStartTag. As written, the default doStartTag of TagSupport is called which simply returns SKIP_BODY, causing doAfterBody to never be called.
D. When doAfterBody returns EVAL_BODY_AGAIN the doTag method is called again. The doTag method resets iterationCount to 0, resulting in an infinite loop and a java.lang.OutOfMemoryError is thrown.

Answer: C

I think the answer should also include option A according to this snippet on page 541 of HFJS 2nd Edition.
BANG!
The Container can reuse classic tag handlers!
Watch out--this is completely different from SimpleTag handlers, which are definitely not reused.
That means you have to be very careful about instance variables--you should reset them in doStartTag.
You can never fail the SCJP exam if you read and understand the Kathy Seirra completely.
Rather you can definitely get above 80.
So if you do not have Kathy Sierra go and get it, success will be yours.
14 years ago
Hi everyone,

I have passed the SCJP 5.0 with 87%, thanks to Kathy Seirra and Bert Bates for writing such a wonderful book.
14 years ago
Hi everyone,

I have cleared SCJP 5.0 and I am willing to take SCWCD 5.0.
I want to know is it necessary to have this certification.
What is the best book for SCWCD 1.5?
Is HFSJ is a good one?
I would like to thank Kathy and Bert to write such a wonderful book for SCJP..
I read this only book and I got 87% in SCJP.
I hope the book for SCWCD will have the same worth.
14 years ago