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"??
SCJA, SCJP5.0, SCBCD, SCWCD
Arvind Giri
Ranch Hand
Joined: Jun 26, 2005
Posts: 91
posted
0
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"
JSP2.0 specification, 3-29 JSP.C.1 XML Schema for TLD, JSP 2.0. page 413 of the PDF file.
Rahul Jadaun
Ranch Hand
Joined: Oct 05, 2006
Posts: 36
posted
0
The spec saying different things..! So what is correct? Somebody please clarify. I already have a lot of things to be confused about.
Sreeraj G Harilal
Ranch Hand
Joined: Apr 19, 2006
Posts: 310
posted
0
I already have a lot of things to be confused about.
its really funny
SCJP 5.0<br />SCWCD 1.4<br />Preparing for <b>SCEA</b>.<br /><b>"I prefer an interesting vice to a virtue that bores."</b>
Arvind Giri
Ranch Hand
Joined: Jun 26, 2005
Posts: 91
posted
0
Hey! I got the answer, its very ridiculous.
I developed a simple tag and didn't specify the body-content.
myTags.tld
TestTagHandler.java
test.jsp
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?
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.