• Post Reply Bookmark Topic Watch Topic
  • New Topic

EL Variable (like, for example: ${test}) is not evaluated

 
Yamir Encarnacion
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have the following custom tag



I call this tag like follows:


However, for some reason EL variables ${test}, ${path} and ${label} are not evaluated. They print out as ${test}, ${path}, and ${label}

I would like for them to be evaluated to their respective values. How do I achieve this?

p.s. This same code was working fine in a previous application I used it in. Also, I am using Tomcat 5.5 and JSTL 1.1
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read through the JSP FAQ entries on this issue? Is your web app properly declared in web.xml?
 
Yamir Encarnacion
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear Bibeault. Your post guided me to the information that I needed.

Read http://faq.javaranch.com/java/ElOrJstlNotWorkingAsExpected which lead me to change
To:
<code>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
</code>
From
<code>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
</code>
in WEB-INF/web.xml
Thanks again
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's what the FAQs are for! Glad they helped.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!