Meaningless Drivel is fun!
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

EL question

sawan parihar
Ranch Hand

Joined: Aug 24, 2004
Posts: 250
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.

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.

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

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.

I agree. Here's the link:
subject: EL question
It's not a secret anymore!