• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scriptlets acceptance

 
Hussam Odeh
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone, I've finished reading HFSJ 2 three times and have some doubts, one of them is:

which of the following accepts scriptlets in its body?

1- tag files
2- SimpleTags
3- IterationTags
4- BodyTags
5- standard actions
6- JSTL

and which of the above accepts scriptlets as a value in its attributes?

i hope my question is clear, because i get little confuse about this issue.
 
Hussam Odeh
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,

any idea about this question?

your response is highly appreciated.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Over the course of the three days you've been waiting for an answer, did you try to look up this info in the JSP Specification?
 
Hussam Odeh
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
Over the course of the three days you've been waiting for an answer, did you try to look up this info in the JSP Specification?


Dear Mr. Bibeault,

maybe you didnt notice the post "No Replies!!!", my exam is on Monday, and im solving mock exams as much as i can, Im not asking for an answer of a mock question, I just have doubt about it and need help.

Anyway, thanks alot.
 
Eurig Jones
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Options for all:
EMPTY: no body at all
TAGDEPENDENT: Means EL, Tags and scripting don't work
SCRIPTLESS: Nothing that starts with a <% but EL and tags work
JSP: Anything goes!

For a Tag File: EMPTY, SCRIPTLESS (default) or TAGDEPENDENT.
You specify body-content with the OPTIONAL <%@ tag body-content="xxx" %> in the *.tag file.

For a Simple Tag: EMPTY, SCRIPTLESS (default) or TAGDEPENDENT

For a Classic Tag: EMPTY, SCRIPTLESS, TAGDEPENDENT or JSP (default)

Custom tags define their MANDATORY <body-content> in the TLD.

For JSTL and Standard Actions: Anything goes

So. The Answer:
Any tags that are classic tags which have JSP as <body-content>. JSTL and standard actions are probably classic tags under the hood.
[ September 04, 2008: Message edited by: Eurig Jones ]
 
Hussam Odeh
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eurig Jones,

Thank you so much for this valuable reply, it was realy helpfull.

But what about the value of the attributes, can all have anything (scriptlets, EL, ...) according to the value of <rtexprvalue> ? or they also have some conditions like the body?
[ September 05, 2008: Message edited by: Hussam Odeh ]
 
Eurig Jones
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If <rtexprvalue> is true an attribute will accept <%= %> expressions, or EL expressions.

If you put a scriptlet as a value it will just accept it as a string. It won't process the scriptlet. Only Expressions and EL it will process.

If <rtexprvalue> is false the attribute will take EVERYTHING as a String and <%= %> expressions, or EL expressions will not be processed.

This is the case with all tags.
 
Hussam Odeh
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Eurig, wish me luck
 
Eurig Jones
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're obviously not like me. I hate being wished luck!
 
Hussam Odeh
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eurig Jones:
You're obviously not like me. I hate being wished luck!


Well, its not about the luck itself, because i dont believe in luck , its about the encouragement, and its good to be encouraged.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic