It's not a secret anymore!
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSTL c:when Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply locked New topic

JSTL c:when

Alan Hermin
Ranch Hand

Joined: Feb 16, 2006
Posts: 290
Hi all........
i am working with JSP 1.2
i have request attribute that get either "0" or "1" as Strings...
and i have JSTL c:when like this: can i make the test attribute if when tag works successfully..???
remember:i am working with JSP 1.2..

Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 951

Change this

<%=((String)request.getAttribute("myAtt")).equals("1") %>

The getAttribute method return Object.


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63540

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: JSTL c:when
It's not a secret anymore!