This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

default value of tag

 
reubin haz
Ranch Hand
Posts: 287
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"??
 
Arvind Giri
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)).
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Arvind Giri
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Satou,
Now I am confused. Could you please tell me where it is mentioned that there is no default value.
Please reply.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 310
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I already have a lot of things to be confused about.

its really funny
 
Arvind Giri
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic