[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1219
  • Last Modified:

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.

0
javabeat
Asked:
javabeat
1 Solution
 
javabeatAuthor Commented:
nice 1 mohammedf, I clearly didn't look hard enough :D...thanks again!.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now