You can't, and you shouldn't. If you need the same code in servlets and JSPs move it to a
Java class, maybe as a static method. Or even better, keep all code out of the JSP pages; they're not meant for doing computations. You can use backing beans, JSTL tags, or your own custom tags for that.
[ November 13, 2007: Message edited by: Ulf Dittmer ]