This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes el-ignored doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "el-ignored doubt" Watch "el-ignored doubt" New topic
Author

el-ignored doubt

Vani Chinta
Ranch Hand

Joined: Mar 25, 2007
Posts: 38
Hi,
I am trying to send param values to included jsp from main jsp using jsp:include and jsp aram standard actions. Included jsp is named as header.jspf. But when I try to display param attribute in the included jspf, it is not evaluating EL and the expression is printed as it is.
Here is my initparam.jsp which is calling an included jsp.[/CODE][/CODE][code]
<html><body>Passing parameters to included file using jsp aram
<jsp:include page="header.jspf">
<jsp aram name="jspName" value="initparam"/>
</jsp:include>

</body>
</html> [/code]

Here is included jsp named as header.jspf
[code] <h1> Header:SCWCD </h1>
${param.jspName} [/code]

I am able to see the param attribute value in the result,if I specify el-ignored to be "false" in DD for url pattern of type .jspf
[code] <jsp-config>
<jsp-property-group>
<url-pattern>*.jspf</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>
</jsp-config>
[/code]

My questions is since el-ignored is false by default, why is EL not getting evaluated . and why is it ignoring EL in the included fragment?

Should we specifically mention not to ignore EL in DD?

Thanks


SCJP 1.4
Sergio Tridente
Ranch Hand

Joined: Mar 22, 2007
Posts: 329

Try renaming your file to Header.jsp (and not setting el-ignoreg in jsp-config). My bet is that it will work, but still I don't know why. I have had the same problem before and it seems to be solved by changing the jspf extension. A configuration problem in Tomcat? I don't know.


SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
Vani Chinta
Ranch Hand

Joined: Mar 25, 2007
Posts: 38
Yes ST,
It is working with jsp. I tried that. Not sure what is different with .jspf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: el-ignored doubt
 
Similar Threads
JSP fragments and EL
is it required to set el-ignored to true in DD?
Doubt in el-ignored
.jspf file not behaving as .jsp file: example in HFSJ
Tag file attribute not evaluated