Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<body-content> in <tag> of <taglib> in .tld

 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ranchers, please tell me if it is obligatory to specify <body-content>?
I test it and I have an error that I have invalid body content - without specyfing it.
Is there any implicit body content?
I know that there is one in tag files - scriptless. But what about tld?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You kind of answered your own question, didn't you?
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear, sorry - I am real confused. One Tomcat version is different from another
I want to be sure.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you omit it, and get an error, that means it's mandatory.

How are Tomcat version different? If they implement different revision levels of the JSP Specification, then yeah, the rules might be different.
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read the end of:

http://www.coderanch.com/t/470561/Web-Component-Certification-SCWCD/certification/jsp-useBean

You will know what I have on my mind. JSP spec says something: may but it is not obligatory
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


and

The TLD for the class tag.DoItManyTimes specifies an invalid body-content (JSP) for a SimpleTag.

I do not understand it.
 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Lucas.

For SimpleTag's 'jsp' is not valid option of <body-content>
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is not valid for Simple Tags and Tag Files? Something more?
 
Ankit Garg
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is simple. The default body-content value is JSP, and since simple tags cannot have its body-content as JSP, so if you don't include the body-content tag, you'll get an error...
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I see. But where JSP body-content can be used?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Classic tags.
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear. Everything is clear now. I am going sleeping now, good night JavaRanch
 
Ankit Garg
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good night JavaRanch
GN.jpg
[Thumbnail for GN.jpg]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic