aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Body content of Simple tsg Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Body content of Simple tsg" Watch "Body content of Simple tsg" New topic
Author

Body content of Simple tsg

Savyatha Reddy
Greenhorn

Joined: Jun 10, 2008
Posts: 14
Does Simple tags support body content "JSP" or not? Please clarify me..
Antonio Tercero
Ranch Hand

Joined: Jun 05, 2008
Posts: 110
Simple tags DON'T support JSP body content


SCJP 5, SCWCD 5
Srividhya Kiran
Ranch Hand

Joined: Feb 17, 2008
Posts: 166
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

Joined: May 03, 2007
Posts: 93
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

Joined: May 11, 2006
Posts: 38
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.


Amit Prakash Singh<br /> <br />SCJP 1.4 93% <br />SCWCD1.5 85%
sudhakar karnati
Ranch Hand

Joined: May 03, 2007
Posts: 93
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

Joined: Feb 17, 2008
Posts: 166
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

About body content


[My Blog]
All roads lead to JavaRanch
Savyatha Reddy
Greenhorn

Joined: Jun 10, 2008
Posts: 14
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

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

Only for classic custom tags..
Jan Sterk
Ranch Hand

Joined: Jun 06, 2008
Posts: 139
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.


SCJP 1.4 (81%)<br />SCWCD 5 (95%)
Srividhya Kiran
Ranch Hand

Joined: Feb 17, 2008
Posts: 166
Thanks ranchers. So classic tag can have scripting elements in their body. Am I right?
Amit Prakash Singh
Ranch Hand

Joined: May 11, 2006
Posts: 38
Thanks ranchers. So classic tag can have scripting elements in their body. Am I right?



Yes sir, you are right!!!
Srividhya Kiran
Ranch Hand

Joined: Feb 17, 2008
Posts: 166
Thanks Amit.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Body content of Simple tsg