• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Body content of Simple tsg

 
Savyatha Reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does Simple tags support body content "JSP" or not? Please clarify me..
 
Antonio Tercero
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple tags DON'T support JSP body content
 
Srividhya Kiran
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • 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
 
sudhakar karnati
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • 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
 
Amit Prakash Singh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
About body content
 
Savyatha Reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • 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 Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
body-content "JSP" is only for custom tags..

Only for classic custom tags..
 
Jan Sterk
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Thanks Amit.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic