aspose file tools
The moose likes JSP and the fly likes EL Variable (like, for example: ${test}) is not evaluated Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "EL Variable (like, for example: ${test}) is not evaluated" Watch "EL Variable (like, for example: ${test}) is not evaluated" New topic
Author

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

Yamir Encarnacion
Greenhorn

Joined: Aug 23, 2006
Posts: 5
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

Joined: Jan 10, 2002
Posts: 56185
    
  13

Have you read through the JSP FAQ entries on this issue? Is your web app properly declared in web.xml?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Yamir Encarnacion
Greenhorn

Joined: Aug 23, 2006
Posts: 5
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

Joined: Jan 10, 2002
Posts: 56185
    
  13

That's what the FAQs are for! Glad they helped.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: EL Variable (like, for example: ${test}) is not evaluated
 
Similar Threads
Implementation of google charts in JSP
JSTL : not working with JSP 2.0
Best choice for pagination?
problem with tiles
html:link and form