﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-老钟-文章分类-Struts2</title><link>http://www.blogjava.net/LaozhonG/category/50803.html</link><description>并不是每一次雨后，都会有彩虹</description><language>zh-cn</language><lastBuildDate>Sun, 12 Feb 2012 01:50:16 GMT</lastBuildDate><pubDate>Sun, 12 Feb 2012 01:50:16 GMT</pubDate><ttl>60</ttl><item><title>Struts2学习笔记</title><link>http://www.blogjava.net/LaozhonG/articles/369806.html</link><dc:creator>LaozhonG</dc:creator><author>LaozhonG</author><pubDate>Sat, 11 Feb 2012 18:49:00 GMT</pubDate><guid>http://www.blogjava.net/LaozhonG/articles/369806.html</guid><wfw:comment>http://www.blogjava.net/LaozhonG/comments/369806.html</wfw:comment><comments>http://www.blogjava.net/LaozhonG/articles/369806.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/LaozhonG/comments/commentRss/369806.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/LaozhonG/services/trackbacks/369806.html</trackback:ping><description><![CDATA[<div><div>1.拦截器</div><div><span style="white-space:pre">	</span>1).实现Interceptor接口</div><div></div><div><span style="white-space:pre">	</span>2).继承AbstractInterceptor</div><div></div><div><span style="white-space:pre">	</span>3).继承MethodFilterInterceptor</div><div><span style="white-space:pre">		</span>1.includeMethods包含的方法 具体action中具体方法名</div><div><span style="white-space:pre">		</span>2.excludeMethods不包含的方法</div><div><span style="white-space:pre">	</span>4).interceptor-stack拦截器栈</div><div><span style="white-space:pre">		</span></div><div>2.令牌验证</div><div><span style="white-space:pre">	</span>1).&lt;s:token&gt;</div><div><span style="white-space:pre">	</span>2).tokenSession</div><div><span style="white-space:pre">	</span></div><div>3.upload &lt;s:file/&gt; multipart/form-data 文件名取名按一定的规律来</div><div></div><div>4.#attr.页面直接取四大作用域的值方法</div><div></div><div>5.记录拦截器和execute方法的执行时间(timer)</div><div><span style="white-space:pre">	</span>Executed action [/test/first!execute] took 16 ms.</div><div><span style="white-space:pre">	</span></div><div>6.一个HTML form标签中可能有两个或多个submit按钮</div><div><span style="white-space:pre">	</span>&lt;s:form action="submit.action" &gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;s:textfield name="msg" label="输入内容"/&gt; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;s:submit name="save" value="保存" align="left" method="save"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;s:submit name="print" value="打印" align="left" method="print" /&gt; &nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &lt;/s:form&gt;</div><div><span style="white-space:pre">	</span></div><div>7.OGNL中的${...}可以在定义Action的result时，传递变量，如/deleteBook.action?isbn=${isbn}。也可以在国际化时引用变量；&nbsp;</div><div>#用于在页面上引用ActionContext的值，也可以构造映射（Map）等，如#request.xxx；&nbsp;</div><div>%{...}在标签属性中引用变量，如&lt;s:url value="Edit.action?isbn=%{isbn}" /&gt;&nbsp;</div><div><span style="white-space:pre">	</span></div><div><span style="white-space:pre">	</span></div><div>8.document.createElement一次只能是添加一个元素，也就是只能添加一对标签</div></div><img src ="http://www.blogjava.net/LaozhonG/aggbug/369806.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/LaozhonG/" target="_blank">LaozhonG</a> 2012-02-12 02:49 <a href="http://www.blogjava.net/LaozhonG/articles/369806.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>