| Author |
Doubt on tagfile body content
|
MInu
Ranch Hand
Joined: Oct 09, 2003
Posts: 517
|
|
This is regarding tag files. "A tag body cannot use scripting elements" what does it mean?..can anyone please explain this...
|
God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
|
 |
Narendra Dhande
Ranch Hand
Joined: Dec 04, 2004
Posts: 950
|
|
Originally posted by Vinod NS: This is regarding tag files. "A tag body cannot use scripting elements" what does it mean?..can anyone please explain this...
This means that when you use the tag file tag in JSP body, The body encloed in the open and end tag can not have scripting elements. thanks
|
Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
|
 |
MInu
Ranch Hand
Joined: Oct 09, 2003
Posts: 517
|
|
it means that i can't do like this? <my:Header> <%="Hello"%> </my:Header> But i tried the above code and did'nt get any errors. <%@ attribute name="attr" required="false" rtexprvalue="true" %> <%@ tag body-content="tagdependent" %> This is header file. <jsp oBody/> Thanks.
|
 |
Narendra Dhande
Ranch Hand
Joined: Dec 04, 2004
Posts: 950
|
|
Hi,
Originally posted by Vinod NS: it means that i can't do like this? <my:Header> <%="Hello"%> </my:Header> But i tried the above code and did'nt get any errors. <%@ attribute name="attr" required="false" rtexprvalue="true" %> <%@ tag body-content="tagdependent" %> This is header file. <jsp  oBody/> Thanks.
Because you set the body-content to tagdependent. If the body content is tagdependent, the body is not interpreted by the container. Try scriptless value, which is default, or remove the tag directive from your tag file. It is surely error. Thanks [ March 09, 2006: Message edited by: Narendra Dhande ]
|
 |
MInu
Ranch Hand
Joined: Oct 09, 2003
Posts: 517
|
|
yes..now it is clear. so if the body content is 'tagdependent' then we can put anything in the body of a tag. But whatever you put in the body will treated as plain text. Thanks.
|
 |
 |
|
|
subject: Doubt on tagfile body content
|
|
|