You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Albert Kao <al...@yahoo.ca> on 2014/10/30 23:17:10 UTC

variable substitution in html:textarea

How to do variable substitution in html:textarea? e.g. Java code
package util;
public interface Literals {    public static final String LAST_NAME = "lastName";}
my.jsp
<%@ page import="util.Literals" %>

<html:textarea rows="20" cols="100" property="buffer" value='<%=Literals.LAST_NAME %>'></html:textarea>

I try to make "lastName" to appear at my.jsp but get the following instead:<%=Literals.LAST_NAME %>

Re: variable substitution in html:textarea

Posted by Christoph Nenning <Ch...@lex-com.net>.
> How to do variable substitution in html:textarea? e.g. Java code
> package util;
> public interface Literals {    public static final String LAST_NAME 
> = "lastName";}
> my.jsp
> <%@ page import="util.Literals" %>
> 
> <html:textarea rows="20" cols="100" property="buffer" value='<%
> =Literals.LAST_NAME %>'></html:textarea>
> 
> I try to make "lastName" to appear at my.jsp but get the following 
> instead:<%=Literals.LAST_NAME %>


Try to put it into a page scrope attribute and use JSTL.

Could look like this:


<c:set var="lastName"><%=Literals.LAST_NAME %></c:set>
<html:textarea value="${lastName}"></html:textarea>




regards,
Christoph

This Email was scanned by Sophos Anti Virus