On 10/25/2003 03:00 AM Balakrishnan, Vijay wrote:
Hi,

How do i do the following portName.length() inside test :
<c:set var="portName" value="TEST" />
<c:if test="${ portName.length() > 15}">  <================
                                
</c:if>


Hi Vijay,
you can't use portName.length() because length() is not one of the javabean specification-compliant methods of String. In fact, I don't think String has any.


What you can try and this is without testing, is:

<c:set var="portNameLen"><%="TEST".length() %></c:set>
<c:if test="${portNameLen > 15}">
....
</c:if>

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to