• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

taglib descriptor doubt

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I have founf this question in Enthuwere.

For a tag to accept any valid jsp code as its body, what should be the value of <body-content> for this tag's taglib descriptor?

Options

Select 1 correct option.

a.JSP

b.jsp

c.any

d.text

d.The <body-content> subelement itself may be absent.

I have selected answer is B.because while reading the jsp tag in the jsp file we should give the body content is jsp in tld file rite.but they are giving answer is d.for that they given explanation also.I am not able to understand that one.here I have attached explanation also here. please any body clear this confusion.



If it is absent, JSP is assumed which is OK!
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer is A. It must be caps.
See this for more
 
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
correct options are a and d coz body-content default value is JSP. If body-content is not present it considers it to be JSP.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ruquia tabassum:
correct options are a and d coz body-content default value is JSP. If body-content is not present it considers it to be JSP.



That is not correct. The body-content element is mandatory; there must be exactly one in every tag element.
 
naresh govindaswmay
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I red some where in books <body-content> tag default value is "scriptless".Please make me clear on this..
 
Sandeep Krish
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is were you read it.
 
Jan van Mansum
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sandeep Krish:
This is were you read it.



In the tag library descriptor file (the .tld file) the body-content element is mandatory. You are referring to the body-content attribute of the tag directive in a tag file. This attribute defaults to "scriptless" and not "JSP", by the way. "JSP" is not even allowed, as tag files are translated to tag handlers implementing the SimpleTag interface, which disallows body-content "JSP".

Please refer to JSP 2.0 specs Figure JSP.C-3 (p. 3-17) and Table JSP.8-2 (p. 1-180).
 
I need a new interior decorator. This tiny ad just painted every room in my house purple.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic