Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Chawla's mock: default body-content

 
Rama Raghavan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Default value for body-content element of tag library descriptor is
A empty
B jsp
C tagdependent
D none of these
I'd say D. The correct answer shown was B
But shouldn't it be JSP (all caps) for B to be correct?
Rama
 
g madhava
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right!
 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
It can be small case also.As you are putting it in a .tld file & not .xml(xml is case sensitive).
More,if you like you can put some junk value in the tld & even then you will not get any error.
As:
<body-content>
jsp123
</body-content>
will give you no error
 
k space
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your web container must be very forgiving. I got the following error
�illegal value for : 'jsp123'�
 
Vedhas Pitkar
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Tomcat4.0.3What about you?
 
k space
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using WebLogic 7. The point is not which web server. The JSP 1.2 Spec stated that
<body-content>
Provides a hint as to the content of the body of this action. Primarily intended for use by page composition tools.
There are currently three values specified:
tagdependent The body of the action is passed verbatim to be interpreted by the tag handler itself, and is most likely in a different �language�, e.g. embedded SQL statements. The body of the action may be empty. No quoting is performed.
JSP The body of the action contains elements using the JSP syntax. The body of the action may be empty.
empty The body must be empty
The default value is �JSP�.
The syntax is:
<!ELEMENT body-content (#PCDATA) >
#PCDATA ::= tagdependent | JSP | empty.
Values are case dependent.
I found that WebLogic accepted "jsp" (lowercase), but don't assume all web servers behave the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic