用JSP定制标签 创建丰富的超连接2
<?xml version="1.0" encoding="UTF-8"?>
<Hrefs>
<Section name="hsct">
<Href url="http://oea.larc.nasa.gov/PAIS/HSR-General.html";
text="Overview of NASA's HSCT program"/>
<Href url="http://www.beyond2000.com/news/Aug_00/story_739.html";
text="HSCT project objectives and motivation"/>
<Href url="http://vesuvius.jsc.nasa.gov/er/seh/pg34s95.html";
text="NASA's High Speed Research Page"/>
<Href url="http://www.amitgoel.com/vizcraft/index.html";
text="HSCT visualization"/>
<Href url="http://www.aerospace.nasa.gov/goals/fsvtp.htm";
text="Affordable supersonic travel"/>
<Href url="http://www.aerospace.nasa.gov/goals/images/g6icon1.jpg";
text="What does it look like?"/>
</Section>
<Section name="xvs">
内容来自dedecms
<Href url="http://oea.larc.nasa.gov/PAIS/HSR-Cockpit.html";
text="The external visibility system concept"/>
<Href url="http://www.aerospace.nasa.gov/library/ar99/obj6.html#6-5"
text="Cockpit with an artificial view"/>
<Href url="http://lisar.larc.nasa.gov/IMAGES/SMALL/EL-1998-00169.jpeg";
text="What does it look like?"/>
</Section>
</Hrefs>
最后我们大体看一下JSP标签的执行。标签有一个体,标签处理器继承自javax.servlet.jsp.tagext.BodyTagSupport.,并且它仅实现了doStartTag()和doAfterTag()这两个方法,doStartTag()方法仅返回EVAL_BODY_TAG,指明标签体需要评价,doAfterTag()方法处理所有自定制标签的操作,他返回SKIP_BODY,知名标签体已经不存在并不再被请求。标签体就是JSP标签打开和关闭元素之间的那部分。 dedecms.com
下面是标签处理器的简略的代码文件: 织梦内容管理系统
public class MultiLinkTag extends javax.servlet.jsp.
tagext.BodyTagSupport
文章评论
共有位Admini5网友发表了评论 查看完整内容