一个自定义的EL函数,如:${my:reverse(param["foo"])};一个自定义的标签,如:<my:reverse value="${param["foo"]}"/>。使用自定义EL函数时只需在JSP代码中输入<%@ taglib prefix="my"uri="myuri1"%>即可;使用自定义标签时同样也是需要在JSP代码中输入<%@ taglib prefix="my"uri="myuri2"%>。这个myuri1或myuri2都是在web.xml中定义好的。如:<jsp-config><taglib><taglib-uri>myuri1</taglib-uri><taglib-location>/WEB-INF/jsp2/jsp2-example-taglib.tld</taglib-location></taglib></jsp-config>然后再在这个tld里写入class的路径。如:<function><description>Reverses the characters in the given String</description><name>reverse</name><function-class>jsp2.examples.el.Functions</function-class><function-signature>java.lang.String reverse( java.lang.String )</function-signature></function>然后再写Java文件,编译成class放在jsp2\\examples\\el\\Functions.class就可以了。Java的内容我在这就省略了。我感觉自定义EL函数怎么和自定义标签差不多呢。至少使用的时候完全一样。上面我写的是自定义EL函数的全过程。自定义标签和这个有什么区别呢?