| Author |
tag file - tagdependent and scripting
|
Radmika Arunachalam
Ranch Hand
Joined: Mar 29, 2004
Posts: 45
|
|
Hi, I have sample code as below.. // Header.tag // test.jsp I getting "${test} in teh browser but not the scripting ("Hi Viewers How are u?").. Since my body-content is tagdependent, why it is not displaying scripting? I know in HFSJ given "scripting not alowed in the body of the tag files" but what about if said tagdependent - is it not mean body is implementation dependent and processed by tag itself.. Any Idea why it is behaving like this? I am not able to find topics related to this in spec.. Thanks in advance Thanks Radmika
|
 |
Murali Krishna Vyamasani
Greenhorn
Joined: Dec 05, 2004
Posts: 3
|
|
Hi Radmika, When you say <%@ tag body-content="tagdependent" %> the body content is treated like plain text so EL,tags and scripts will not be evaluated. So the El tag ${text} is being printed because it is just treated as normal text. This code <%= "Hi Viewers How are u? " %> is an expression so it is not being evaluated. U can also refer HFSJ pg.498 for information on this. Ranchers correct me if I am wrong. Murali.
|
 |
Murali Krishna Vyamasani
Greenhorn
Joined: Dec 05, 2004
Posts: 3
|
|
Hi radmika, I am sorry. I just realised suddenly that when u say tagdependent everything in the body should be treated as normal text. So part of my statement is wrong " So the El tag ${text} is being printed because it is just treated as normal text. " It should also be ignored. I don't know why it is printing. The output that you got would be correct if the body-content were scriptless which is the default value. Hope somebody clears it. Murali.
|
 |
 |
|
|
subject: tag file - tagdependent and scripting
|
|
|