`
- 浏览:
97565 次
-
jsp自定义标签<body-context>取值说明
body-content的值有下面4种:
<xsd:enumeration value="tagdependent"/>
<xsd:enumeration value="JSP"/>
<xsd:enumeration value="empty"/>
<xsd:enumeration value="scriptless"/>
tagdependent:标签体内容直接被写入BodyContent,由自定义标签类来进行处理,而不被JSP容器解释,
如下:
<test:myList>
select name,age from users
</test:myList>
JSP:接受所有JSP语法,如定制的或内部的tag、scripts、静态HTML、脚本元素、JSP指令和动作。如:
<my:test>
<%=request.getProtocol()%> // ②
</my:test>
具体可参考后面附源码。
empty:空标记,即起始标记和结束标记之间没有内容。
下面几种写法都是有效的,
<test:mytag />
<test:mytag uname="Tom" />
<test:mytag></test:mytag>
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
authorization-module,标签实现包,在jsp开发项目中能轻松实现分页.无需自己手动写类.此包已经封装过. 只需在页面调用标签就OK了
<servlet> <servlet-name>HelloWorldname</servlet-name> <!-- 此说明该<servlet/> 已经得到了注册名HelloWorldname, 既此servlet已经得到了注册名HelloWorldname, 它与<servlet-mapping/>必须注册同样的注册...
自定义标签的简单例子<br>hello<br>包括四个文件,<br>自定义标签由标记处理程序( java)<br>和标签的描述组成(tld,xml).<br><br>java中是定义一个类,jsp所有的标签都实现jsptag接口。<br>标签库的接口与类的继承...
1.需要用到的类 TimeTage.java 继承了 SimpleTagSupport 类的一个... <body-content>empty</body-content> </tag> 3.index.jsp中需要调用 <%@taglib prefix="TimeOut" uri="http://www.TimeTag.com"%> <TimeOut:out/>
网页上显示日历,自定义的标签 < ?xml version="1.0" encoding="UTF-8"?> < !DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" ...
java 自定义标签的解读: 书写tld文件《此tld文件写上文件的头,版本号<tlib-veision>,和页面的访问短名称<short-name>》。 <?xml version="1.0" encoding="UTF-8"?> <taglib version="2.0" xmlns:xsi=...
<bodycontent>empty</bodycontent> <!-- 以下用于声明该标记的属性(可以有多個) --> <attribute> <name>times</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> ...
jsp脚本和<logic:iterate>标签:实现循环和分支逻辑 jsp脚本和<logic:iterate>标签:实现循环和分支逻辑 jsp脚本和<logic:iterate>标签:实现循环和分支逻辑
<artifactId>jsp-api</artifactId> <version>2.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-impl</artifactId> <version>1.2_...
【版本更新说明】 ·Tomcat环境下,修订图片、flash、多媒体以及附件上传后路径问题; 部署方式: 1、把文件夹下除WEB-INF... <url-pattern>*.jsp</url-pattern> </servlet-mapping> 6、重新启动服务器即可。
<img src="${pageContext.request.contextPath}/checkcode.jsp"/> 另外在web.xml中配置验证码类的加载: <servlet> <servlet-name>CheckCodeImage</servlet-name> <servlet-class>...
<param-value></param-value> </init-param> </filter> <filter-mapping> <filter-name>returnFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 谢谢大家,...
<context-param></context-param> context-param元素声明应用范围内的初始化参数。 <filter></filter> 过滤器元素将一个名字与一个实现javax.servlet.Filter接口的类相关联。 <filter-mapping></filter-mapping> ...
<context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/database.xml /WEB-INF/applicationContext.xml </param-value> </context-param> ... </jsp-config>
title/>这个标签会找到被装饰页面的title(<title></title>标签内)内容填入, <decorator:head/>找到被装饰页面的head(<head></head>标签内)内容填入,<decorator:body/>找到被装饰页面的body(<body></body>标签内)...
<servlet-name>Connector</servlet-name> <servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name...
Web.xml常用元素<web-app><display-name></display-name>定义了WEB应用的名字<description></description> 声明WEB应用的描述信息<context-param></context-param> context-param元素声明应用范围内的初始化参数。...
<welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> 4 cas client 2.0配置说明 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns=...
--Servlet的映射,用来说明客户端IE中输入什么样的地址字符串对应到哪个Servlet的别名--> <!--在该例中在IE地址栏中firstservlet字符串对应到别名为firstservlet的servlet--> <servlet-mapping> <servlet-name>...
<welcome-file>index.jsp</welcome-file> </welcome-file-list> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <!-- 默认找的文件名 --> </listener...