struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared Blitzstein <mailing-l...@blitzstein.net>
Subject Re: Checking the request attribute by using the Struts tags in the next jsp page..
Date Sat, 02 Sep 2006 14:18:52 GMT
You can do it with either struts or JSTL depending on which you want  
to use. I prefer JSTL and this is how I'd do it

<c:choose>
   <c:when test="${po == 'open'}">
      This is open
   </c:when>
   <c:otherwise>
      This is closed
   </c:otherwise>
</c:choose>

with struts you could use logic:equal and logic:notEqual (http:// 
struts.apache.org/1.2.4/api/org/apache/struts/taglib/logic/package- 
summary.html#package_description). Search for "logic:equal" on that  
page.



On Sep 2, 2006, at 7:30 AM, SrinivasaReddy wrote:

> Hi..,
>
> I am setting the po values in links as
> http://<utl>:8080/ApplicationName/viewPO.do?po=open
>
> http://<utl>:8080/ApplicationName/viewPO.do?po=close
>
> in the display page, if po=open i should display some test,  
> otherwise po=close i should display someother text.
>
> i should check this po value by using struts tags (ie by using  
> logic tags).... not request.getAttributer()...etc
>
>
>
> Regards
> Srinivasa Reddy
>


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


Mime
View raw message