Forums Register Login
default value of tag
I met a question asking what is the default value of the body-content attribute of a custom tag implementing the SimplyTag interface.

There are answers for all 4 types of values, and 2 more choices: Depends on the implementation; None of the above

The answer is "Depends on the implementation".

I chose "None of the above" since we know the specification has said it no longer defines the default value in JSP 2.0.

So isn't the answer "None of the above" is more appropriate? Or does "no longer defines the default value in JSP 2.0." means "Depends on the implementation"??
According to jsp 2.0 specs , default value of body-content is JSP(Page Number: 166(1-133)). and for tag directive it defaults to scriptless(Page Number: 196(1-163)).
reubin, I agree. It's written nowhere that it depends on the container. It only says that there's no default value anymore, and that "A reasonable default for simple tag handlers is "scriptless" if the tag can have a body"

I would have chosen "None of the above" too.
Hey Satou,
Now I am confused. Could you please tell me where it is mentioned that there is no default value.
Please reply.
JSP2.0 specification, 3-29
JSP.C.1 XML Schema for TLD, JSP 2.0.
page 413 of the PDF file.
The spec saying different things..! So what is correct? Somebody please clarify. I already have a lot of things to be confused about.
I already have a lot of things to be confused about.

its really funny
Hey! I got the answer, its very ridiculous.

I developed a simple tag and didn't specify the body-content.




and I am getting following exception

Does that mean that default value of body-content is JSP( Irrespective of type of tag(be it simple or classic)), But simple tag don't support JSP as body-content?
Do you pee on your compost? Does this tiny ad?
Rocket Oven Kickstarter - from the trailboss

This thread has been viewed 854 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 18, 2018 14:03:21.