• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCRIPTING-INVALID declaration

 
markthaiman markthaiman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi anyone,

I have some doubts about Declaration for <scripting-invalid>
Let say if we specify like below in DD

declare -->
<url-pattern> do.jsp </url-pattern>
<scripting-invalid> true </scripting-invalid>

From this declaration, it means that scripting is not allowed in do.jsp.
My question is what happen if we declare scripting in do.jsp
1. Scripting Not evaluated and print nothing
or
2. Scripting not evaluated and exception is thrown

Could anyone please explain about this? I am still new about this.

Thanks
Mark
 
Durgaprasad Guduguntla
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use any declaration, expression or scripting in a JSP whose <scripting-invalid> element is set to true, it will throw the exception with the following message:
 
markthaiman markthaiman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Durgaprasad Guduguntla

I gonna take exam Feb 3. I also thanks to u helping me clearifying about this.I will be update u guys after I finish exam about question in exam.

Mark
 
Naveed Ali
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i read in HFS that as per final JSP sepcs you now can not specify the <scripting-invalid> element through JSP. you have to declare it only in DD for the required JSP. What about this?

regards
naveed
 
Durgaprasad Guduguntla
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ali,

That is exactly true. Scripting cannot be disabled at page level through Page directive attribute in the JSP. However you can make scripting invalid for a particular JSP using <url-pattern> element in web.xml file as shown below:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic