zoukankan      html  css  js  c++  java
  • JAVA-JSP之taglib指令

    相关资料:
    《21天学通Java Web开发》
    http://blog.csdn.net/dyyaries/article/details/9960987

    备注:
    这个实例我没有跑起来,我看的是另一个网页上的资料。

    结果总结:
    1.taglib指令用来声明此JSP文件使用了自定义标签,同时引用所指定的标签库并设置标签库的前缀。
    2.<%@ taglib uri="URIToTagLibrary" prefix="tagprefix"%>
    3.taglib指令包含两个属性,分别为uri和prefix。
    4.uri属性用来指定标签库的存放位置
    5.prefix属性用来指定该标签库使用的前缀。

    实例代码:

     1 <%@ page contentType="text/html; charset=GB2312" %>
     2 <%-- 声明页面中将要引用的标签库--%>
     3 <%@ tablib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
     4 <html>
     5 <head>
     6   <title>taglib指令使用示例</title>
     7 </head>
     8 <body>
     9   <%-- 使用JSTL标签输出字符串 --%>
    10   <c:out value="Hello, World!" />
    11 </body>
    12 </html>
    View Code
  • 相关阅读:
    练习1-6
    c语言while(1)和while(0)
    练习1-3
    每天总结模电--(三)
    每天总结模电——贴片电阻,电容的命名规则(二)
    服务器应用的通用功能
    UML
    算法合集
    python笔记
    笔面试(2019秋招阶段)
  • 原文地址:https://www.cnblogs.com/FKdelphi/p/7453738.html
Copyright © 2011-2022 走看看