I have currently use jstl to my jsp pages. I displayed some data in <td>
tag.
In that data length exceed the 15 characters i need to only display the first 15 characters and followed by ..
.
In that case i can use jstl <c:if test="">
and validate the length and display where it necessary or else i can use <jsp:useBean>
and create a bean and do the validation part in that bean and give the response back to jsp page.
what is the best way to do that .memory consumption and performance wise what would be the best?
It should make no significant difference either way.
You should pick whichever approach makes your code more readable, understandable and extendable, and only worry about memory consumption and performance as and when it becomes a problem.