Link to home
Start Free TrialLog in
Avatar of javabeat
javabeat

asked on

Hi all, is there no standard way to format Strings in JSTL?

Hi all, i'm trying to pull lots of text fields from beans into a jsp page i'm fairly determined not to use scriptlets etc. I've checked all the standard JSTL tags and it seems like there's nothing available to support formatting of strings!? is this right or have i missed something!? I could of course do a number of different options:
a) Write a method in the bean to format (I just need a simple substring like method) the field.
b) Write a custom tag to format strings (seems like a lot of work for something so simple and it would feel like reinventing the wheel?
c) Accept the use of <%= myfield.substring(x,y) %>

this is of course a fairly trivial example but it applies to so many pages. Dates and number formatting seems very well supported but there seems like such a strong emphasis on keeping JSP's scriptlet/expression free that i cant believe i cant find a tag for text formatting?

Any thoughts much apprec.

ASKER CERTIFIED SOLUTION
Avatar of mohammedf
mohammedf
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of javabeat
javabeat

ASKER

nice 1 mohammedf, I clearly didn't look hard enough :D...thanks again!.