Struts 2 provides a slick way to do such a thing
via OGNL:
I don't know of a Struts 1 equivalent, but that's not to say it can't be done. I'd probably just use a scriptlet or utility bean and move on to more important problems
[ May 30, 2008: Message edited by: Joe Ess ]