• 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

Body content of Simple tsg

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does Simple tags support body content "JSP" or not? Please clarify me..
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simple tags DON'T support JSP body content
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Antonio

Can you tell me what are the body-content for a tag file, simple tag and classic tag. Even I am not very clear with this.

For Tag file, the body-content can be

<%@ tag body-content="empty"|"scriptless"|"tagdependent"%>

and the default is scriptless. correct me if I am wrong. Similarly I want to know for simple and classic tag

Thanks
Srividhya
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Simple tags DON'T support JSP body content



Can you please tell me on which page in HFSJ 1st edition it is mentioned..i want to read that part again.

Thanks & Regards,
Sudhakar Karnati
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
chapter 10 : part : What exactly IS a JspFragment?

Please see in this part mentioned it has been mentioned that "The crucial thing you must remember about JspFragment is that it
must NOT contain any scripting elements"

Now, with body-content = "JSP" , everything written in a JSP is valid for the body of tag including scriptlet. So we can not use body-content = "JSP" for the simple tag.
 
sudhakar karnati
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Amit,

I could not relate that sentence to that much deeply before seeing this post..

Thanks for your information.

Thanks & Regards,
Sudhakar Karnati
 
Srividhya Kiran
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So body-content for simple tag are same as tag file which is empty,scriptless and tagdependent. Am I right? and is the default value again is scriptless? Please let me know for Classic Tag also.

Thanks
Srividhya
 
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
About body content
 
Savyatha Reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ranchers.. Now, Iam very clear about the body-contents for tag files, simple tags and custom tags.. actually page-472 of HSFJ confused me..they shd have mentioned there itself that body-content "JSP" is only for custom tags.. then it would be nore clear..
 
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

body-content "JSP" is only for custom tags..


Only for classic custom tags..
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a good thing to know that the container translates tag files into SimpleTag classes. That's why they're both allowed the same types of body content.
 
Srividhya Kiran
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ranchers. So classic tag can have scripting elements in their body. Am I right?
 
Amit Prakash Singh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks ranchers. So classic tag can have scripting elements in their body. Am I right?




Yes sir, you are right!!!
 
Srividhya Kiran
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Amit.
 
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic