Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
    Bookmark Topic Watch Topic
  • New Topic

JSTL c:when

 
Alan Hermin
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 951
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

Change this

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

The getAttribute method return Object.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65657
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!