File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply locked New topic
Author

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:



Then...how 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: 950
Hi,

Change this

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

The getAttribute method return Object.

Thanks


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

Joined: Jan 10, 2002
Posts: 61766
    
  67

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] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL c:when