快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

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

1. <html:html>
 <html:html lang="true">
 </html:html>
=>  转为Html后(下同):
 <html lang="zh-CN">
 </html>
2. <html:base/>
 <html:base/>
=>
 <base href="http://localhost/AddressBook/regGuest.jsp">
//本页面的绝对地址
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="http://www.csdn.net" 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="CSDN\\'>http://www.csdn.net?name=hehehe">CSDN首页</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="http://www.csdn.net" 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: http://www.csdn.net?name=hehehe<p/>
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/>


返回类别: 教程
上一教程: JSP 2.1技术规范投票通过 表达式语言有所改进
下一教程: IBM HTTP Server 远程溢出漏洞 

您可以阅读与"Struts学习笔记: Html标签库学习(Html基本标签)"相关的教程:
· Struts学习笔记: Html标签库学习(Form标签)
· JSP学习笔记__JSP标签库
· 学习笔记-标签使用(J2SE5.0)中的元数据
· struts 学习笔记(一)--搭建环境
· 扬扬的J2EE学习笔记(二)J2EE的客户端/服务器
    微笑服务 优质保证 索取样品