aspose file tools*
The moose likes Struts and the fly likes Applying logic tags for DATE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Applying logic tags for DATE" Watch "Applying logic tags for DATE" New topic
Author

Applying logic tags for DATE

Shah Anwar
Greenhorn

Joined: Jan 25, 2011
Posts: 2
Dear all,
Well it has been days looking around the net for the answer for this. I'm still new to struts and i hope someone can assist me.

Here is my target:
1) To apply logic for date that is retrieved from the bean.
2) Print conditional output based on the cut-over date, 01/01/2011 (DD/MM/YYYY)
3) The logic :- If detDate >= 01/01/2011, the line will print out: "Old rates". Else, the line will print out: "New rates".

Here is what i have tried:


Unfortunately the output does not print any text instead only blanks.

Would appreciates some advice. Thank you in advance.
srikanth arroju
Ranch Hand

Joined: Aug 02, 2006
Posts: 66
Dear Anwar ,

I have tried to compare directly from logic tag but not able to format the date .
so i have done the comparision in Action and displayed the rate in view.






Shah Anwar
Greenhorn

Joined: Jan 25, 2011
Posts: 2
Thank you srikanth,

Unfortunately i don't have access to the java back-end side, were only given privilege to edit the .jsp files.

Therefore i've ended up with this javascript:



It seems to do the "make-up" work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applying logic tags for DATE