• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

Struts学习笔记: Html标签库学习(Html基本标签)

发布: 2007-7-01 18:47 | 作者: admin | 来源: | 查看: 64次 | 进入软件测试论坛讨论

领测软件测试网

1. <html:html>
 <html:html lang="true">
 </html:html>
=>  转为Html后(下同):
 <html lang="zh-CN">
 </html>
2. <html:base/>
 <html:base/>
=>
 <base href="">
//本页面的绝对地址
3. <html:link>
 <%
  String cheyo = "hehehe";
  pageContext.setAttribute("coolName", cheyo);
 %>
 <html:link forward="success" paramId="name" paramName="coolName">成功页面</html:link><p/>
 <html:link page="/here.jsp?bigId=3&amp;smallId=7">Here</html:link><p/>
 <html:link href="" paramId="name" paramName="coolName">CSDN首页</html:link><p/>
=>
 <a href="/AddressBook/hello.jsp?name=hehehe">成功页面</a><p/>
 <a href="/AddressBook/here.jsp?bigId=3&amp;smallId=7">Here</a><p/>
 <a href="首页</a><p/>

/*
<html:link forward="success" paramId="bookName" paramName="name"
  paramProperty="book"></html:link> //用book这个JavaBean的name属性的值作为名为bookName参数的值
<html:link page="hello.jsp" name="map"></html:link>  //map有一个HashMap对象,可以以于传递一个参数名多个参数值
*/
4. <html:rewrite>
 <%
  String cheyo = "hehehe";
  pageContext.setAttribute("coolName", cheyo);
 %>
 Rewrite Forward: <html:rewrite forward="success" paramId="name" paramName="coolName"/><p/>
 Rewrite Page: <html:rewrite page="/here.jsp?bigId=5&amp;smallId=3"/><p/>
 Rewrite Href: <html:rewrite href="" paramId="name" paramName="coolName"/><p/>
=> 
 Rewrite Forward: /AddressBook/hello.jsp?name=hehehe<p/>
 Rewrite Page: /AddressBook/here.jsp?bigId=5&amp;smallId=3<p/>
 Rewrite Href: >
5. <html:img>
 <html:img page="/struts.gif"/><p/> /* 相对于Web应用根目录 */
 <html:img src="/struts.gif" paramId="name" paramName="coolName"/><p/>/* 相对于服务器根目录 */
 <html:img page="/struts.gif?name=oyeah"/><p/>
=>
 <img src="/AddressBook/struts.gif"><p/>
 <img src="/struts.gif?name=hehehe"><p/>
 <img src="/AddressBook/struts.gif?name=oyeah"><p/>

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网