wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes EL question 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 "EL question" Watch "EL question" New topic
Author

EL question

sawan parihar
Ranch Hand

Joined: Aug 24, 2004
Posts: 250
Hi,
On page 336 H&F it says that the page directive will only turn off the EL if the DD declares a <el-ignored>true</el-ignored> element with a url pattern that inclues this JSP.

But i think page directive take precedence over the DD tag. Can anyone help me understand this.

Thanks in advance.


Sawan<br />SCJP,SCWCD,SCBCD<br /> <br />Every exit is an entry somewhere.
Ritu varada
Ranch Hand

Joined: Sep 08, 2004
Posts: 117
For example, consider this web.xml file.
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>

This means that EL is not ignored for any jsp pages because of the wildcard pattern. But in an individual jsp,I can have this directive,
<%@ page isELIgnored="true" %>.
For that particular jsp where the page directive is used, the EL is turned off becuase the page directive takes precedence over the DD declaration. Hope this helps.


SCJP,SCWCD(1.4)
sawan parihar
Ranch Hand

Joined: Aug 24, 2004
Posts: 250
I think my question was not clear. Suppose i haven't specified anything in the DD , that means the el will be evaluated (default behaviou). But if in my jsp i use the page directive to set el evaluation to 'FALSE' that means that for this jsp EL won't be evaluated.

That means On page 336 the answer of this question is wrong.

Thanks for your reply.
sundar katluri
Greenhorn

Joined: Dec 14, 2004
Posts: 25
u r right ,page directive get prcedence

see errata here
sawan parihar
Ranch Hand

Joined: Aug 24, 2004
Posts: 250
Hi ,
Thanks for that.

Sawan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EL question
 
Similar Threads
Doubt in HFS in chapter 6
isELignored doubt
EL Ignore query
Doubt on isELIgnored
isELIgnored and el-ignored