File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Using EL in non-JSP code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Using EL in non-JSP code" Watch "Using EL in non-JSP code" New topic

Using EL in non-JSP code

Alok Pota
Ranch Hand

Joined: Mar 07, 2001
Posts: 185
Can the EL (expression language) that ships with JSP 2.0 and JSTL be used
in non-JSP context, like in a regular Java class?
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
I can not answer that specific question.
Can you explain why you want to do that.
But, I have one comment for you.
Nice book(your .net for java developers).

SCJP, blog
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

Only if it is passed an instance of a JspContext or PageContext, since you need this context to obtain an instance of javax.servlet.jsp.el.ExpressionEvaluator.
Of course, you could always implement your own concrete classes for the abstract classes and interfaces in javax.servlet.jsp.el and roll your own.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Using EL in non-JSP code
It's not a secret anymore!