Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tag file attribute not evaluated

 
Tim Storms
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Servlets are you using ? Can you show the web-app tag of your web.xml ?
 
Tim Storms
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ...
 
Tim Storms
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it works like a sharm. Thanks Vladimir!
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anytime ...
 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the question please ...

Thank you ...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic