Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on tagfile body content

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is regarding tag files.

"A tag body cannot use scripting elements"

what does it mean?..can anyone please explain this...
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic