Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

How to compare jstl value with String value  RSS feed

 
Sameer Nandgaonkar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
In my code i am using jstl tags.
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd ");
GregorianCalendar cal = new GregorianCalendar();
String dd = sdf.format(cal.getTime());
Here i can get current date which is in (2007-05-16)Format.
<c:if test="${row.followup_date==currdate_id}">//Here i am comparing followup_date with my current date.The problem is my followup_date is in date format(YYYY-MM-DD).I am comparing this value but it will not work.Can you please tell me how can i access that value which is dd in this c:if tag. please help me.Instead of currdate_id in c:if i use 2000-05-16 hard coded the code work properly.but when i compare with the variable it won't work.please tell me.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please take care not to post the same question more than once.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!