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&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&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&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&smallid=3<p/>
rewrite href: http://www.csdn.net?name=hehehe<p/>
5. <html:img>
<html:img page="http://www.VeVb.com/struts.gif"/><p/> /* 相对于web应用根目录 */
<html:img src="http://www.VeVb.com/struts.gif" paramid="name" paramname="coolname"/><p/>/* 相对于服务器根目录 */
<html:img page="http://www.VeVb.com/struts.gif?name=oyeah"/><p/>
=>
<img src="/addressbookhttp://www.VeVb.com/struts.gif"><p/>
<img src="http://www.VeVb.com/struts.gif?name=hehehe"><p/>
<img src="/addressbookhttp://www.VeVb.com/struts.gif?name=oyeah"><p/>
新闻热点
疑难解答