Forums Register Login

JavaBeat question, SKIP_BODY

+Pie Number of slices to send: Send



Could anybody please focus on this, why the output is Hello?
SOURCE


Thanks,
+Pie Number of slices to send: Send
Hi,

The output is Hello because you did not override the doStartTag() method, which its default return value is SKIP_BODY, so, the body will not be be evaluated.

Best of luck ...
+Pie Number of slices to send: Send
Because MyTag doesn't override the doStartTag() method.

The default behavior of the doStartTag is that there is no body evaluated.

You should add the following code for getting output

+Pie Number of slices to send: Send
Thanks Vassili & Remko!

I got the that.

You rock dude.


Thanks,
+Pie Number of slices to send: Send
It is always a good idea to set up the code in question and run it to see what is happening and why. You can even step thru the code in debug mode.

I did this when preparing for the exam and I learned so much that the exam was a breeze...
+Pie Number of slices to send: Send
I agree with you Michael!

Thanks,
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 867 times.
Similar Threads
doubts in CustomTags
Mock Exam Question.
Doubt on Tag Files
Taghandler doubt
jdiscuss mock exam question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:11:25.