I don't have access to the earlier messages, but have you been able to get _any_ JSTL tags to work? Do you have the JSTL jars and everything? I've never had _any_ problems with JSTL that weren't traceable to a wrong taglib or a missing JAR.

Dave

Albrecht Leiprecht wrote:

No matter if I set it
pageContext.setAttribute("errmsglength", new Integer(errmsglength));

or like this

<c:set><%=errmsglength%></c:set>

No dots, nada. I will create a fresh project that simulates the current situation and see
if it shows the same behavior... That might allow me to track down the
problem.

At least, I learned that EL is somewhat picky about what it sees and what
not ;)

Thanks anyway guys... I'll post again, if/when I found the reason for this

Rgds
albi



-----Original Message-----
From: Troy Bull [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:47 PM
To: Struts Users Mailing List
Subject: Re: Conditionally show values in Tile (c:when?)

Greg Reddin wrote:

On Aug 11, 2005, at 9:30 AM, Albrecht Leiprecht wrote:

Just did the following:
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

<%
   int errmsglength = 5;
%>


Further down:

<c:if test="${errmsglength > 1}">...</c:if>

One would expect to see the 3 dots ... but nada ...
And yes ...the taglib is loaded in the first line of the file ...Funky
...isn't it ?
Again, I think you're trying to access something in EL that it doesn't know about. EL doesn't (in my understanding) automatically obtain scriptlet variables. You'd have to put errmsglength in PageContext so EL can find it. Try this:

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

<%
   int errmsglength = 5;
   pageContext.setAttribute("errmsglength", new Integer(errmsglength));
%>

<c:if test="${errmsglength > 1}">...</c:if>


Greg

or you can do something like:

<c:set><%=variable%></c:set>

you need to put appropriate attributes on the c:set tag of course.

troy


Reply via email to