This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ First Edition - Being a JSP - Mock Exam Question 13

 
Sai Surya
Ranch Hand
Posts: 463
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chinmaya Chowdary
Ranch Hand
Posts: 432
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 463
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 874
Android Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic