sudhakar karnati

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

Recent posts by sudhakar karnati

given tag : SimpleTag --> Handler --> SimpleTagHandler
ClassicTag --> Handler --> ClassicTagHandler
Both the tag are declare to be non empty and non tag dependent.



Hi Sunny,

i think you are referring to HFSJ 1st edition if yes please refer to the errata for this and it says:


[567] question 17;
Both tags are declared to be non-empty in the TLD.
should read:
Both tags are declared to be non-empty and non-tag dependent in the TLD.



and one more thing regarding this question is Simple tags cannot have scripting in their body.Please check this link

Thanks
Sudhakar
Hi Anitha,

Congrats on clearing SCWCD.
Can you please let us know what material you read and mock exams you appeared for?

Thanks
Sudhakar
I feel HFSJ is for the people who are new to servlets and JSP..
Becuase i am into Quality Control which is no way related to coding(and zero experience with JAVA) but i found these books Head first Java and Head first Servlets and JSP quite useful and taught many things.

Thanks
Sudhakar

Answer is 1. The Servlet will output 'javabeat null' in the Server Console.



I ran the above example in Netbeans.and its extra features made me this mistake.

Thanks
Sudhakar
Answer is 1. The Servlet will output 'javabeat null' in the Server Console.

Thanks & Regards,
Sudhakar Karnati
For me important topics are: Session listeners,Sample web.xml,sample taglib and custom tags concepts.

It all depends on our week areas.

If your question is related to the weightage of the each objective,I have no idea.

Thanks & Regards
Sudhakar Karnati
I think you will find this useful..click here It is related to the same question

Thanks & Regards,
Sudhakar Karnati
I think this question is from Enthuware..

Answers are:
2 or 3 doubt I forgot..
but 4 and 5 are correct.

Thanks & Regards,
Sudhakar Karnati
[ August 07, 2008: Message edited by: sudhakar karnati ]
It throws exception for the beans..but it displays nothing in the case of Maps
you have any eperience on Servlets & JSP?

Thanks & Regards,
Sudhakar Karnati

public void doStartTag() ?



Thanks Christophe Verre,

Now i understood.I hope i wont do these kind of silly mistakes in the exam..
This is a question from Enthuware:

You are creating a tag called SmartInputTag to replace the HTML <input> tag. If the request contains a value for a given parameter, this tag automatically puts that value in the input tag for that parameter. This tag is useful when the same form is redisplayed to the user if it fails validation. For example, if the user has already input 28 as the value of "age" parameter, your SmartInputTag will generate the following outout:

<input type="text" name="age" value="28" />

Which of the following is an appropriate tag handler method to achieve this?



a)

b)

c)

d)

Which option would you select?

I selected answer as (b) but the answer given is (d)

Any idea on why option b could be wrong?

Thanks & Regards
Sudhakar Karnati

From my knowledge There is no method "getAncesterWithClass" in BodyTagSupport or its superclass TagSupport. Infact the correct method is findAncestorWithClass.



Even i am thinking the same.

But the answers are C & E.

No explanation given for the option C.


Thanks & Regards,
Sudhakar Karnati
[ July 31, 2008: Message edited by: sudhakar karnati ]

Case 1: /Recipes/HopsList.do - 1,2,5 (My answer) 1,5,2 (Book answer)
Case 2: /Recipes/Modify/ModRecipes.do - 1,4,5(My answer) 1,5,4 (Book answer)



You are considering the order of occurences of mapping elements but it is not the case. First match all the url pattern filters and then servlet mapping elements..As you can see in the book answers servlet mapping filter is the last filter in both cases..

Thanks & Regards,
Sudhakar Karnati
Hi All,

This is a question from Enthuware:

Consider two cooperating tags orchestra:band and orchestra:instrument, which are used as follows:

<orchestra:band>
<orchestra:instrument name="trumpet" />
<orchestra:instrument name="violin" />
</orchestra:band>

Given that band is implemented by BandTag and instrument is implemented by InstrumentTag, both of which extend BodyTagSupport.

The band tag needs to get the "names" (the value of the name attribute of instrument tags) of all the instruments that it contains. Which of the following approaches will you use?



Options:
Please select two options:

a) In doStartTag method of BandTag, call super.getChildren() to get an array of Tags. Iterate through the Tags, and call getName() after casting each element to InstrumentTag.

b) In doStartTag method of BandTag, call pageContext.getChildren() to get an array of Tags. Iterate through the Tags, and call getName() after casting each element to InstrumentTag.

c) Define a method addName() in BandTag. In the doStartTag() of InstrumentTag, get a reference to BandTag through super.getAncesterWithClass() and call the addName() method.

d) Define a method addName() in BandTag. In the doStartTag() of InstrumentTag, get a reference to BandTag through pageContext.getAncesterWithClass() and call the addName() method.

e) Define a method addName() in BandTag. In the doStartTag() of InstrumentTag, get a reference to BandTag through super.getParent(), and call the addName() method.

Which options you think are correct..

I think option E is correct and all other options seem to be wrong.

Thanks & Regards,
Sudhakar Karnati