| Author |
HFSJ First Edition - Being a JSP - Mock Exam Question 13
|
Sai Surya
Ranch Hand
Joined: Feb 08, 2006
Posts: 442
|
|
Dear All,
Q: Which statements about disabling scripting elements are true? (Choose all the apply.)
A. You can't disable scripting via the DD.
B. You can only disable scripting at the application level.
C. You can disable scripting programatically by using the isScriptingEnabled page directive attribute.
D. You can disable scripting via the DD by using the <scripting-invalid> element.
I answered BD. But the correct answer as per the book is only D.
I don't understand why answer B is not correct . Giving <scripting-invalid> in the DD disables scripting
for all the JSP's matching a particular URL pattern which is for the whole application. So we can only disable
scripting at the application level and NOT at individual JSP level.
Please correct me if I am wrong.
|
Sai Surya, SCJP 5.0, SCWCD 5.0, IBM 833 834
http://sai-surya-talk.blogspot.com, I believe in Murphy's law.
|
 |
Chinmaya Chowdary
Ranch Hand
Joined: Apr 21, 2008
Posts: 432
|
|
Hi Sai.
B. You can only disable scripting at the application level.
What you have explained above is true for application level. We can also disable scripting for individual jsp through DD. Here the question has mentioned the word 'only', I think this caused option B not correct.
|
 |
Sai Surya
Ranch Hand
Joined: Feb 08, 2006
Posts: 442
|
|
Chinmaya Chowdary wrote: We can also disable scripting for individual jsp through DD.
Thanks for reply Chinmaya and it makes sense now, however how do we disable scripting for individual JSP through DD? Do we give the exact URL of the JSP in the <url-pattern>?
|
 |
Balu Sadhasivam
Ranch Hand
Joined: Jan 01, 2009
Posts: 874
|
|
Do we give the exact URL of the JSP in the <url-pattern>?
Yes , BTW there is no such thing as "isScriptingEnabled" , its was just in draft which dint make it to the final release.
|
 |
 |
|
|
subject: HFSJ First Edition - Being a JSP - Mock Exam Question 13
|
|
|