File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tag file attribute not evaluated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tag file attribute not evaluated" Watch "Tag file attribute not evaluated" New topic
Author

Tag file attribute not evaluated

Tim Storms
Ranch Hand

Joined: Apr 27, 2006
Posts: 64
I've got a problem with a tag file. When I want to show a tag attribute, it is printed out as "${subtitle}" in my browser. The EL expression has not been evaluated. This is my code:

Tag file (in WEB-INF/tags):


JSP file:


Any suggestions? Thanks!


SCJP 1.5, SCWCD 1.4, SCBCD 5
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Which version of Servlets are you using ? Can you show the web-app tag of your web.xml ?


[My Blog]
All roads lead to JavaRanch
Tim Storms
Ranch Hand

Joined: Apr 27, 2006
Posts: 64
I'm using the 2.4 version.


I tried the same code on my home pc where I didn't have this problem. Can't see what's causing this here though.
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi,

I was facing the same problem, and i used the tag directive with the isELIgnored attribute set to false, as follows and it worked :



Best of luck ...


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Tim Storms
Ranch Hand

Joined: Apr 27, 2006
Posts: 64
Yes, it works like a sharm. Thanks Vladimir!
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Anytime ...
Tiffiny Yang
Ranch Hand

Joined: Mar 29, 2006
Posts: 124
Is that works?

Mine does not.

I remeber one a mock question I did was asking tagdependent is defined body-content, then what's happening when you have scriptlet and EL express inside the body part.

the anser is Scripting won�t get translated ( no display in the browser)
EL will be treated as plain text. I've tried it. it works as explained.
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Can you post the question please ...

Thank you ...
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

isELIgnored = "false"

This is wrong. From version 2.4, EL is enabled by default. You don't need to set this attribute anymore. The problem lies somewhere else.
Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
OK where's the problem ?

I really need to know it, i have defined the web.xml exactly in the way so it can adhere the 2.4 and it still did not work till i set it manually ...

Please i need to hear from you ...

Thanks in advance ...
Dagbj�rn Nogva
Greenhorn

Joined: May 20, 2007
Posts: 10
Hi,

One explanation could be the presence of an el-ignored element in the DD.



This element will turn off EL evaluation in all *.jsp files, but may be overridden by a <%@ page isELIgnored="false" %> directive in an individual JSP page.

Dagbj�rn
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tag file attribute not evaluated