为什么自定义的TLD标签的uri会指向一个域名地址

SMJADEL 2020-07-30 03:31:38
<?xml version="1.0" encoding="UTF-8" ?>

<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version="2.0">

<description>JSTL 1.1 functions library</description>
<display-name>JSTL functions sys</display-name>
<tlib-version>1.1</tlib-version>
<short-name>fns</short-name>
<uri>http://java.sun.com/jsp/jstl/functionss</uri>

<function>
<description>获取管理路径</description>
<name>getAdminPath</name>
<function-class>com.jeeplus.common.config.Global</function-class>
<function-signature>java.lang.String getAdminPath()</function-signature>
<example>${fns:getAdminPath()}</example>
</function>
...全文
3272 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
s478853630 2020-08-06
  • 打赏
  • 举报
回复
uri可以改的

<?xml version="1.0" encoding="UTF-8"?>
<taglib>
	<tlib-version>2.0</tlib-version>
	<jsp-version>1.0</jsp-version>
	<shortname>m</shortname>
	<uri>/mvc</uri>

	<tag>
		<description>输出上下文路径</description>
  		<name>contextPath</name>
  		<tag-class>org.apache.commons.mvc.tag.ContextPathTag</tag-class>
  		<body-content>empty</body-content>
	</tag>

</taglib>
JSP页面代码: <%@ taglib prefix="m" uri="/mvc"%> <script type="text/javascript" src="<m:contextPath/>/js/jquery.js"></script>

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧