| Author |
comparing string to int in JSTL
|
mark hunt
Greenhorn
Joined: May 02, 2007
Posts: 8
|
|
Hello, I'm trying to compare two values with different type (String, int). Using scriplets, i would just covert one datatype to another and then compare them. How would i convert one to another in JSTL?. This is what i'm doing and it's not working (it never returns true): divisionModel.divisionId is of type int. I tried using "==" operator as well but didn't work. Could someone please let me know what i'm doing wrong??. Thanks for your time and suggestion Mark
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
Technically you are not comparing in the JSTL but the EL. Check the EL section of the JSP Spec to see what conversions occur during comparisons. [ June 14, 2007: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
mark hunt
Greenhorn
Joined: May 02, 2007
Posts: 8
|
|
Thanks Bear. Problem solved.
|
 |
 |
|
|
subject: comparing string to int in JSTL
|
|
|