web JSP页面按钮权限控制(tld标签标签类实现BodyTagSupport)

本文介绍了如何在web JSP页面中实现按钮的权限控制,通过自定义tld标签和ButtonTag类扩展BodyTagSupport。详细讲解了tld文件配置、ButtonTag类的实现以及页面引用方法,利用工作码和用户权限进行控制。
摘要由CSDN通过智能技术生成
1.xxx-tags.tld(关联具体的tag类)

放在WEB-INF目录下

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
  <tlib-version>2.2.3</tlib-version>
  <jsp-version>1.2</jsp-version>
  <short-name>tms</short-name>
  <uri>/xxxx-tags</uri>
  <display-name>"Struts Tags"</display-name>
  <description><![CDATA["To make it easier to access dynamic data;
                    the Apache Struts framework includes a library of custom tags.
                    The tags interact with the framework's validation and internationalization features;
                    to ensure that input is correct and output is localized.
                    The Struts Tags can be used with JSP FreeMarker or Velocity."]]></description>
                    
  <tag>
    <name>button</name>
    <tag-class>xxx.tag.ButtonTag</tag-class>
    <body-content>JSP</body-content>
    <description><![C
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值