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

Where is scripting enabled??and where is it disabled?

 
trivikram Kumar
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone please be clear on this:

It says tag files body content cannot have scripting...and scriptless is default.

But for the simple tags...when we use JspFragment..we cannot use scripting as well.

And it also says that the when we use the body-content element in the DD ,while using custom tags,we can have scripting enabled.

I am now confused where scripting is allowed and where its not...
Please Ranchers.....Clear my confusion.

Thanks a lot in advance,
Javainn
[ May 23, 2005: Message edited by: S javainn ]
 
Sanjay pts
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
tagfile and Tag both are different things.I think you need to read litte more to clarify dought.

Thanx
sanjay
 
trivikram Kumar
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanjay,

I know that tag files and tags are different things....Can you tell me if scripting is disabled in tags then???both in custom and simple tags??I have a clear idea of the difference between tag files and tags...My doubt is on scripting...Could someone make this clear???

Thanks,
Javainn
 
trivikram Kumar
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone help me in getting a clear idea on this...please...

Thanks in advance,
Javainn
 
Wei-ju Wu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, as I understand it tag files and simple tags are pretty new concepts, so it makes sense they do not support scripting as because it is considered evil
But we can use jsp actions and EL expressions in the body for simple tags and tag files. For tag files this is done if the there is a tag directive with body-content=scriptless. The alternative would be empty (no body) or tagdependent, which means the body is treated as plain text and will not be further evaluated by the container.

Simple tags do not support scripting, but you can use classic tags (by extending TagSupport or BodyTagSupport) to support the evaluation of scriptlets, expressions and declarations.

HTH

Wei-ju
 
trivikram Kumar
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Wei-ju Wu ,

Thanks a bunch again for clearing my doubt..
Actually I was clear but got confused when I read it another time..
Good that we have people like you in the forum to help people like us.

Thankyou so much,

Javainn.
[ May 25, 2005: Message edited by: S javainn ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic