<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>华水 &#187; Authentication</title>
	<atom:link href="http://huashui.org/tag/authentication/feed" rel="self" type="application/rss+xml" />
	<link>http://huashui.org</link>
	<description>总是到下雨才想到雨伞，总是到拿雨伞时才发现不见了。</description>
	<lastBuildDate>Thu, 29 Jul 2010 09:53:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>在struts2.1中使用注解和拦截器实现权限细粒度控制</title>
		<link>http://huashui.org/post/struts2-1-annotations-interceptor-authentication.html</link>
		<comments>http://huashui.org/post/struts2-1-annotations-interceptor-authentication.html#comments</comments>
		<pubDate>Sun, 07 Feb 2010 04:27:10 +0000</pubDate>
		<dc:creator>Huashui</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[Annotations]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Interceptor]]></category>

		<guid isPermaLink="false">http://huashui.org/?p=227</guid>
		<description><![CDATA[正如上一篇文章说的，拦截器是struts2的核心，同时struts2引入了注解的方式。这里就来简单看看针对struts2.1中使用注解和拦截器的开发。 首先要引入struts2.1各包，特别要引入Convention Plugin插件。 本文只是一个简单模拟，因此我们新建两个jsp文件，分别为登录和退出。 login.jsp &#60;%@ page language=&#34;java&#34; pageEncoding=&#34;GB18030&#34;%&#62; &#160; &#60;% pageContext.getSession&#40;&#41;.setAttribute&#40;&#34;user&#34;,&#34;huashui&#34;&#41;; pageContext.getSession&#40;&#41;.setAttribute&#40;&#34;rights&#34;,&#34;TEST_AUTH&#34;&#41;; %&#62; 登录成功 logout.jsp &#60;%@ page language=&#34;java&#34; pageEncoding=&#34;GB18030&#34;%&#62; &#160; &#60;% pageContext.getSession&#40;&#41;.removeAttribute&#40;&#34;user&#34;&#41;; pageContext.getSession&#40;&#41;.removeAttribute&#40;&#34;rights&#34;&#41;; %&#62; 退出成功 index.jsp &#60;%@ page language=&#34;java&#34; pageEncoding=&#34;GB18030&#34;%&#62; &#60;!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01 Transitional//EN&#34;&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;主页&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;p&#62; $&#123;tip &#125; &#60;/p&#62; &#60;a href=&#34;login.jsp&#34;&#62;登录&#60;/a&#62; &#60;br /&#62; &#60;a href=&#34;logout.jsp&#34;&#62;退出&#60;/a&#62; &#60;br /&#62; [...]]]></description>
		<wfw:commentRss>http://huashui.org/post/struts2-1-annotations-interceptor-authentication.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
