You can use fn:substring and its variants. This can be used with Struts 1 . Don't know about Struts2 though.
Try to use all the business logic in java classes instead In JSP's . As much as you can, make the JSPs merely a thin layer over your Java-based application.