struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@attws.com>
Subject RE: Basic <logic:equals> question
Date Thu, 31 Oct 2002 16:15:09 GMT
> -----Original Message-----
> From: Affan Qureshi [mailto:quereshi@etilize.com]
> Sent: Thursday, October 31, 2002 4:20 AM
> 
> A rather basic question.
> I want to accomplish in my JSP:
> 
> if((request.getParameter("ext")!=null)||(request.getParameter(
> "ext").equals(
> "0")))
> {
>     /* do Something */
> }
> else
> {
>     /* do Something else */
> }

This is one place where using the JavaServer Pages Standard Tag Library (JSTL) provides a
small advantage.  Using the JSTL, this would look something like this:

  <c:choose>
   <c:when test="${param.ext eq '0'}">
     Do something.
   </c:when>
   <c:otherwise>
     Do something else.
   </c:otherwise>
  </c:choose>

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


Mime
View raw message