EL表达式的自定义方法的步骤:
- 1、编写一个普通类,提供一个实现功能的静态方法
- 2、在WEB-INF目录中创建一个扩展名为 .tld 的xml文件,进行相关配置,注意:该文件不能放在classes和lib目录中
- 3、在jsp页面中使用taglib指令引入外部的标签库或者方法库
1、编写一个普通类,提供一个实现功能的静态方法

2、在WEB-INF目录中创建一个

扩展名为 .tld 的xml文件
,并进行相关配置,注意:该文件不能放在classes和lib目录中

3、在jsp页面中使用taglib指令引入外部的标签库或者方法库

4、效果如下图所示:
