File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Differences between ${} and <% %> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Differences between ${} and <% %>" Watch "Differences between ${} and <% %>" New topic

Differences between ${} and <% %>

Toby Kitchens

Joined: Apr 25, 2013
Posts: 1
I have a JSP page that uses an import statement to import Constants:

If I use a scriptlet to pull the constant, it works:

If I use EL it doesn't work:

This was a test. What I'm trying to do is avoid using a scriptlet in a struts tag like below:

Can EL code be used to access a Constants file imported into a JSP?

Thanks in advance!!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63837

No. Which is the whole topic of this article.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Differences between ${} and <% %>
It's not a secret anymore!