Forums Register Login

Data type in JSTL

+Pie Number of slices to send: Send
Hi,

How to check whether the object has numeric value or String value in JSTL. I looked at functions tag library but i dont see any one.
Any help is appreciated.

regards
sudha
+Pie Number of slices to send: Send
Not readily possible. Why do you need to do this? It's a red flag that you are trying to do something in the JSP that should have been handled in the controller.
[ May 08, 2008: Message edited by: Bear Bibeault ]
+Pie Number of slices to send: Send
thanks for info ..I am not clear how to check the value in the controller ..
+Pie Number of slices to send: Send
Well some details as to what you are doing might help.
+Pie Number of slices to send: Send
Hi
String sample;
The sample can have "abcd" or "1234".

if it has character data like abcd then i need to do operation 1
else if it has numeric data like 1234 i need to do operation 2.

I want to check whether the string has numeric data or character. I am not clear how to do that.

Any help is appreciated.
Sudha
+Pie Number of slices to send: Send
What will be the differing operations that you will trigger? Again, you are making us pull teeth to find out what you are doing.

if the reason for the test is to process the data differently, that should take place in controller. If the reason is to effect different view options, you can test in the controller and set an easily-referenced flag the the JSP can use to trigger different view options.
look! it's a bird! it's a plane! It's .... a teeny tiny ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2074 times.
Similar Threads
Does JSTL core tag improves performance with not empty check?
Find length
jstl configuration in web.xml
JSR 168 and JSTL
jstl ..c:set
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 20:06:28.