Interesting..
what about
<c:set var="a" value="${'init'}" />
?
On 20 Sep 2004, at 21:01, Anna Kerekes wrote:
The first way works......thankyou
However, the second way does not :( I get the following error:
exception:
javax.servlet.ServletException: javax/servlet/jsp/el/VariableResolver
root cause:
java.lang.NoClassDefFoundError: javax/servlet/jsp/el/VariableResolver
Any ideas?
________________________________
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Mon 20/09/2004 2:56 PM
To: Struts Users Mailing List
Subject: Re: set not working
<%
java.lang.String a = "init";
request.setAttribute("a",a);
%>
<c:out value="${a}" />
or
<c:set var="a" value="init" />
<c:out value="${a}" />
Mark
On 20 Sep 2004, at 20:16, Anna Kerekes wrote:
Hello,
I am having some problems running the program below (it does not run
the way it should).
*****************The output I get is*******************
before a a is null after a
*****************The desired output is********************
before a init after a
I'm not sure why "${a}" is evaluating to null instead of "init".
any help appreciated,
Anna
Program:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.lang.String" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<HTML>
<%
String a = "init";
%>
<html:text property="var" value="<%= String.valueOf(a) %>" /><br>
<c:out value="before a" />
<c:out value="${a}" default="a is null"/>
<c:out value="after a" />
</HTML>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]