• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

default value of tag

 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"??
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)).
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic