笔记
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&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&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&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&smallId=3<p/>
Rewrite Href: >
5. <html:img>
<html:img page="http://www.webjx.com/struts.gif"/><p/> /* 相对于Web应用根目录 */
<html:img src="http://www.webjx.com/struts.gif" paramId="name" paramName="coolName"/><p/>/* 相对于服务器根目录 */
<html:img page="http://www.webjx.com/struts.gif?name=oyeah"/><p/>
=>
<img src="/AddressBookhttp://www.webjx.com/struts.gif"><p/>
<img src="http://www.webjx.com/struts.gif?name=hehehe"><p/>
<img src="/AddressBookhttp://www.webjx.com/struts.gif?name=oyeah"><p/>