This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

(ANOTHER) Question from Head First Servlets and JSP's  RSS feed

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Which statements about disabling scripting are true? (Choose all that 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 programmatically by using the isScriptingEnabled page directive attribute
D. You can disable scripting via the DD by using the <scripting-invalid> element.



Answer from the book: D

My question is why isn't B also part of the answer? The DD is application level and you can ONLY disable scripting through the DD. (isScriptingEnabled page attribute is deprecated)

Am I wrong here?
 
Ranch Hand
Posts: 133
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It says:

B. You can only disable scripting at the application level.

It's not true because you may do it via DD (declarative configuration) or via directive on the JSP page which for me is the mentioned "application level".

Regards,
Krzysztof
 
Ericson James
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but you can't do it via a page directive anymore. isScriptingEnabled page attribute has been removed.

What is your definition of application level? What I have as "application level" in my head is a low level such as the "application scope" or where you define your dtd before you deploy.
[ August 31, 2008: Message edited by: Eurig Jones ]
 
Krzysztof Koziol
Ranch Hand
Posts: 133
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I was thinking about EL which may be enabled by page directive with a isELIgnored param.
The scripting can be disabled only via DD using <scripting-invalid>. Don't know how to disable/enable it in the *.jsp code

Regards,
Krzysztof
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yah you can only disable scripting on DD but it doesnt have to be application level cos you use <url-pattern> to select the sections where you it to be disabled.
 
Ericson James
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But what IS the definition of "Application Level" here exactly?

Is configuring the DD not considered configuring something at the application level?
[ September 06, 2008: Message edited by: Eurig Jones ]
 
Ericson James
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone have any feedback on this?

Thanks in advance,
Eurig
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check the following web.xml fragment

<jsp-config>
<jsp-property-group>
<url-pattern>*.do</url-pattern>
<scipting-invalid>true</scripting-invalid>
<el-ignored>false</el-ignored>
<jsp-property-group>
<taglib>
<taglib-uri>helloWorld</taglib-uri>
<taglib-location>/WEB-INF/hello.tld</taglib-location>
</taglib>
<jsp-config>


always scripting invalid is specifies for a url-pattern which hence can be to anything from a single JSP to the Entire Web Application.Hence,i feel B cannot be right..
 
Ericson James
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh yes! Thanks Raghavendra.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!