struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict, Paul C" <paul_bened...@merck.com>
Subject RE: EL Mystery
Date Wed, 23 Mar 2005 19:59:28 GMT
Kurt,

JSP 2.0 containers have EL turned off implicitly if you are not using the
Servlet 2.4 spec. Check the top of your web.xml file -- if you see it is
referencing the 2.3 DTD, you need to change it the 2.4 schema.

Thanks,
Paul

-----Original Message-----
From: kurt.e.williams@comcast.net [mailto:kurt.e.williams@comcast.net] 
Sent: Wednesday, March 23, 2005 2:39 PM
To: user@struts.apache.org
Subject: EL Mystery


I have been trying to solve a mystery concerning EL. 

We are using 4 taglibs in our project:

<%-- JSTL tag libs --%>
<%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>

<%-- Struts provided Taglibs --%>
<%@ taglib prefix="html" uri="/WEB-INF/struts-html-el.tld" %>
<%@ taglib prefix="logic" uri="/WEB-INF/struts-logic-el.tld" %>

They are working fine and respond to EL included in their tags.

However, if we try to use EL outside of a tag it simply renders the EL into
the HTML.

${login.fullName} appears as ${login.fullName} on the rendered page.

<c:out value="${login.fullName}"/> renders as the user full name.

In trying to track down why the naked EL won't work I added
isELIgnored="false" to the page directive for the page and if we are not
using any tags with EL in them it works. The naked EL will render what we
are expecting. But as soon as we have a tag with EL in a value or other
attribute the page will error on compile.

I'm confused because I thought EL was active by default and it does work in
our tags but not  outside of any tags. Once we place the isELIgnored="false"
in the page directive the EL works outside of the tags but fails when used
inside some of the tags.

Can some one shed some light on this mystery? Also I have heard that using
EL outside of tags can be a security problem and that it is better to use a
<c:out value="${EL}"/> instead.

Thanks,
Kurt

--
Kurt Williams
Marex Services
kurt.e.williams@comcast.net

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck
& Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates
(which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally
privileged. It is intended solely for the use of the individual or entity named on this message.
 If you are not the intended recipient, and have received this message in error, please notify
us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message