小峰servlet/jsp(5)jsp自定义标签
2017-03-05 16:44
253 查看
一、自定义标签helloworld:
二、自定义有属性的标签:
HelloWorldTag.java:继承TagSupport:
View Code
二、自定义有属性的标签:
HelloWorldTag.java:继承TagSupport:
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <%@ page import="java.util.*" %> 4 <%@ taglib prefix="java1234" uri="/WEB-INF/java1234.tld" %> 5 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 6 <html> 7 <head> 8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 9 <title>Insert title here</title> 10 <% 11 List people=new ArrayList(); 12 people.add("王二小2"); 13 people.add("丝丝光2"); 14 people.add("草泥马2"); 15 pageContext.setAttribute("people", people); 16 %> 17 </head> 18 <body> 19 <java1234:iterate2 items="people" var="p"> 20 <h2>${p }</h2> 21 </java1234:iterate2> 22 </body> 23 </html>
View Code
相关文章推荐
- JSP标签自定义(2)---getProperty
- JAVA WEB学习笔记(五)-自定义JSP标签
- jsp 自定义分页标签
- 创建你的第一个自定义jsp tag(jsp标签)2
- Web小结---Servlet,JSP,过滤器和监听器,四个作用域和九个内置对象,EL表达式语言,自定义标签,JSTL,国际化与汉字的编码
- JSP中的自定义标签(摘录)
- JSP2.0 tags自定义标签学习笔记
- Web小结---Servlet,JSP,过滤器和监听器,四个作用域和九个内置对象,EL表达式语言,自定义标签,JSTL,国际化与汉字的编码
- 创建你的第一个自定义jsp tag(jsp标签)2
- JSP页面中的自定义标签
- Jsp自定义标签使用笔记
- 使用JSTL开发jsp自定义标签开发---迭代标签
- 自定义JSP标签
- Web小结---Servlet,JSP,过滤器和监听器,四个作用域和九个内置对象,EL表达式语言,自定义标签,JSTL,国际化与汉字的编码
- 关于自定义标签 jsp
- 创建你的第一个自定义jsp tag(jsp标签)
- JSP标签自定义(3)---setProperty
- 创建JSP自定义标签
- 通过JSP自定义标签创建丰富多彩的超链接(Creating Richer Hyperlinks with JSP Custom Tags)
- JSP标签自定义