aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ question: disable scripting? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ question: disable scripting?" Watch "HFSJ question: disable scripting?" New topic
Author

HFSJ question: disable scripting?

Kelly Wood
Ranch Hand

Joined: Nov 07, 2004
Posts: 53
This question comes from the end of chapter 7: using jsp

Q: Which statements about disabling scripting elements are true?

One of the choices is: "You can only disable scripting at the application level".

This choice is wrong according to the answer. But I am not sure why it is wrong. My understaning is that scripting can only be disabled in the DD. And since there is one DD per web application, so shouldn't it mean you can only disable scripting at the application level?
Kumar J
Ranch Hand

Joined: Feb 13, 2005
Posts: 35
hi,
disabling at application level mean...disabling the scripting via coding...that anyhow is not allowed and it can be done via dd only...hope this clarifies...
bye


With Regards,<br />Kumar J
Anand Wadhwani
Ranch Hand

Joined: Mar 21, 2005
Posts: 151
Hi Kelly,

The answer in HF book clearly mentions that it is possible to disable scripting for a specific jsp, or set of jsp by specifying <jsp-property-group>, inside this you can specify url-pattern using which you can disable scripting selectively for jsps.

Hope this clarifies.


SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------
Kumar J
Ranch Hand

Joined: Feb 13, 2005
Posts: 35
Originally posted by Kelly Wood:
This question comes from the end of chapter 7: using jsp

Q: Which statements about disabling scripting elements are true?

One of the choices is: "You can only disable scripting at the application level".

This choice is wrong according to the answer. But I am not sure why it is wrong. My understaning is that scripting can only be disabled in the DD. And since there is one DD per web application, so shouldn't it mean you can only disable scripting at the application level?




the statement "You can only disable scripting at the application level". would imply we can do the disabling via JSP page,which we cannot,we can only diable via deployment descriptor as mentioned in the book.Are you there Mr kelly?
bye
Bhumika Thakkar
Ranch Hand

Joined: Apr 18, 2005
Posts: 79
Doesn't application level mean for the whole application, i.e ALL the jsp/servlets in that application are affected in similar way.

As mentioned earlier, we can specify url-pattern in dd to apply scripting-disabling/enabling to specific servlets. If url-pattern is * then it applies to the whole application and this can't be changed at page level. In contrast to el-ignored setting, which can be changed at page level.


SCBCD (Preparing) <br />SCWCD, 82%<br />SCJP, 90%
Anand Wadhwani
Ranch Hand

Joined: Mar 21, 2005
Posts: 151
Bhumika,

Per my understanding what HF mentions mean that we can disable scripting for selective JSPs. Lets take a practica example. We have a web application already in production developed using JSP only and not using any EL. Now if we want to have our pages use EL, for this we want to insist developers use EL and we want to do this step by step (phase by phase) and we do it by using url-pattern and we disable scripting for selective JSPs, e.g. folder-wise.

I was trying to do a POC for this, and that's where I submitted a separate post on this, on which you replied also.

Kelly,

Hope your mock question doubt is clarified, though not supported with practical solution. The problem is that url-pattern is not working the way it is supposed to. It's not necessary to disable the scrpiting at whole application level, we can do it selectively also, that's why jsp-config / jsp-property-group/url-pattern comes into a DD.

Somebody,
If know solution to make it work the way it is supposed to, please help.
Kumar J
Ranch Hand

Joined: Feb 13, 2005
Posts: 35
hi,
what they meant by "application level" is a bit ambiguous...may be they meant at coding level(that's what I felt) else if what you people are putting then definately we can disable scripting at application level...that is if I use the pattern *.* then I am in fact disabling all the JSP's in question...

:roll: any body from HF plz...

kumar
Kelly Wood
Ranch Hand

Joined: Nov 07, 2004
Posts: 53
Guys thanks for your help. I think it is clear now, that disable scripting at the app level means disable scripting for the all jsp in the app.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFSJ question: disable scripting?