锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲熟妇av一区二区三区漫画,亚洲国产精品一区二区第一页免 ,亚洲乱色熟女一区二区三区蜜臀http://www.tkk7.com/usherlight/category/36798.html澶╁鉤灞變笂鐧戒簯娉夛紝浜戣嚜鏃犲績姘磋嚜闂層備綍蹇呭鍐插北涓嬪幓錛屾洿娣繪嘗嫻悜浜洪棿錛?/description>zh-cnFri, 11 Jun 2010 16:00:18 GMTFri, 11 Jun 2010 16:00:18 GMT60Spring Security - Using custom Authentication Processing Filterhttp://www.tkk7.com/usherlight/archive/2010/06/11/323293.html浜戣嚜鏃犲績姘磋嚜闂?/dc:creator>浜戣嚜鏃犲績姘磋嚜闂?/author>Fri, 11 Jun 2010 00:12:00 GMThttp://www.tkk7.com/usherlight/archive/2010/06/11/323293.htmlhttp://www.tkk7.com/usherlight/comments/323293.htmlhttp://www.tkk7.com/usherlight/archive/2010/06/11/323293.html#Feedback0http://www.tkk7.com/usherlight/comments/commentRss/323293.htmlhttp://www.tkk7.com/usherlight/services/trackbacks/323293.html springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy springSecurityFilterChain /* REQUEST INCLUDE FORWARD If you want to externalize all of your security related configuration into a separate file, you can do so and add that to your context location param. contextConfigLocation /WEB-INF/beans.xml , /WEB-INF/springSecurity.xml Now comes the part of security configuration for your application, Adding the URL security patterns is pretty simple and straight forward. Add all the URL patterns which you want to secure and add the wild card pattern at the end. You need to have some default principal and role even for non logged in users as you need to give access to pages like log in, register and forgot password kind of functionality even to non logged in users. I tried to add comments to pretty much every element which I am using here. As an example I added just a wild card intercept url which make every page of my application secure. You need to exclude different urls based on the roles. Following is my custom implementation of AuthenticationEntryPoint, which currently is not doing any thing except leveraging the commence to its super class which is the spring implementation of AuthenticationProcessingFilterEntryPoint. I hooked it to add any custom logic. public class CustomAuthenticationEntryPoint extends AuthenticationProcessingFilterEntryPoint { private static final Log logger = LogFactory.getLog(CustomAuthenticationEntryPoint.class); @Override public void commence(ServletRequest request, ServletResponse response, AuthenticationException authException) throws IOException, ServletException { super.commence(request, response, authException); } } This is my custom authentication manager which actually does the custom login of the user. It will throw an BadCredentialsException in case of invalid credentials or thorws a AuthenticationServiceException in case of a service error (Database error, SQL error or any other error). public class CustomAuthunticationManager implements AuthenticationManager { @Autowired UserManagerService userManagerService; public Authentication authenticate(Authentication authentication) throws AuthenticationException { if(StringUtils.isBlank((String) authentication.getPrincipal()) || StringUtils.isBlank((String) authentication.getCredentials())){ throw new BadCredentialsException("Invalid username/password"); } User user = null; GrantedAuthority[] grantedAuthorities = null; try{ user = userManagerService.getUser((String) authentication.getPrincipal(), (String) authentication.getCredentials()); } catch(InvalidCredentialsException ex){ throw new BadCredentialsException(ex.getMessage()); } catch(Exception e){ throw new AuthenticationServiceException("Currently we are unable to process your request. Kindly try again later."); } if (user != null) { List roles = user.getAssociatedRoles(); grantedAuthorities = new GrantedAuthority[roles.size()]; for (int i = 0; i < roles.size(); i++) { Role role = roles.get(i); GrantedAuthority authority = new GrantedAuthorityImpl(role.getRoleCode()); grantedAuthorities[i] = authority; } } else{ throw new BadCredentialsException("Invalid username/password"); } return new UsernamePasswordAuthenticationToken(user, authentication.getCredentials(), grantedAuthorities); } } At the client side (jsp), the simple configuration you need to do is post the request to"/j_spring_security_check" with parameters "j_username" and "j_password". That's pretty much all you need to do for enabling spring security to your existing web application. I will try to explain about doing the method security using ACL's and configuring the view using spring security tags in another post.

]]>
Tapestry鏈鏂扮増5.1.0.5鏁欑▼錛堜節錛夛細鏉冮檺鎺у埗妗嗘灦鐨勫疄鐜?榪涢樁綃?/title><link>http://www.tkk7.com/usherlight/archive/2010/02/04/312016.html</link><dc:creator>浜戣嚜鏃犲績姘磋嚜闂?/dc:creator><author>浜戣嚜鏃犲績姘磋嚜闂?/author><pubDate>Thu, 04 Feb 2010 11:17:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2010/02/04/312016.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/312016.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2010/02/04/312016.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/312016.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/312016.html</trackback:ping><description><![CDATA[<p>鍦ㄤ笂涓綃囦腑鎴戜滑鐮旂┒浜嗗浣曞疄鐜癝pringSecurity涓璊sp Tag鐨?lt;security:authorize ifAllGranted="ROLE_SUPERVISOR">鐨勫姛鑳姐傝繖涓嬈℃垜浠竴璧風爺絀朵竴涓嬪浣曞疄鐜板湪Tapestry5.1涓坊鍔犱竴涓狥ilter鏉ュ鎵鏈夌殑鎿嶄綔榪涜鏉冮檺鐨勮繃婊ゆ帶鍒躲?br /> 鍦⊿pringSecurity涓紝鎴戜滑涓鑸槸鍦╝pplication-context.xml涓紝娣誨姞涓涓猄pringSecurity鐨凢ilter錛岀劧鍚庡湪鍙﹀涓涓獂ml涓緇嗛厤緗浣曟牴鎹甎rl鐨勮鍒欒繘琛屾潈闄愮殑鎺у埗銆傝孴apestry鐨勫摬瀛︽槸灝介噺鍑忓皯Xml涓殑閰嶇疆錛堝叾IOC瀹瑰櫒涔熷熀鏈笂鏄熼壌Guice鑰屼笉Spring鐨勶級錛屾墍浠ユ垜浠篃鏄湪浠g爜涓疄鐜版潈闄愯鍒欑殑鎺у埗銆?br /> 鎬諱綋涓婃潵鐪嬶紝鍙互鐢ㄤ袱縐嶆柟寮忔潵瀹炵幇url瑙勫垯錛屼竴縐嶆槸Request綰у埆鐨凢ilter錛屼竴縐嶆槸欏甸潰緇勪歡綰у埆鐨凢ilter錛屽鏋滄槸Request綰у埆鐨勮瘽錛屽彲浠ヤ粠Request瀵硅薄涓幏鍙朥rl璺緞錛岃繖鏍峰氨涓嶴pringSecurity鍩烘湰涓鏍蜂簡銆傛湰鏂囦富瑕佷粙緇嶉〉闈㈢粍浠剁駭鍒殑Filter錛屼粠涓垜浠篃鍙互浣撲細鍒癟apestry5.1涓殑IOC瀹瑰櫒鐨勫己澶у拰渚垮埄銆?/p> <p>榪欏氨鏄疐ilter鐨勪唬鐮侊紝榪欎釜Filter蹇呴』瀹炵幇ComponentRequestFilter鎺ュ彛銆傚煎緱娉ㄦ剰鐨勬槸鍏舵瀯閫犲嚱鏁版墍闇瑕佺敤鍒扮殑4涓弬鏁幫紝榪?涓弬鏁伴兘鏄疶apestry5鏈韓鑷湁鐨勬湇鍔★紝鎵浠ユ垜浠粈涔堜篃涓嶇敤鍋氾紝Tapestry5鑷姩浼氬皢鏈嶅姟鐨勫疄渚嬫敞鍏ヨ繘鏉ワ紝榪欏氨鏄疶apestry-IOC鐨勫▉鍔涖?br /> ComponentRequestFilter鎺ュ彛涓鍏辨湁4涓柟娉曢渶瑕佸疄鐜幫紝鍏蜂綋浠g爜濡備笅錛?/p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="color: #008080"> 1</span> <span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> RequiresLoginFilter </span><span style="color: #0000ff">implements</span><span style="color: #000000"> ComponentRequestFilter {<br /> </span><span style="color: #008080"> 2</span> <span style="color: #000000"><br /> </span><span style="color: #008080"> 3</span> <span style="color: #000000">    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">final</span><span style="color: #000000"> PageRenderLinkSource renderLinkSource;<br /> </span><span style="color: #008080"> 4</span> <span style="color: #000000"><br /> </span><span style="color: #008080"> 5</span> <span style="color: #000000">    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">final</span><span style="color: #000000"> ComponentSource componentSource;<br /> </span><span style="color: #008080"> 6</span> <span style="color: #000000"><br /> </span><span style="color: #008080"> 7</span> <span style="color: #000000">    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">final</span><span style="color: #000000"> Response response;<br /> </span><span style="color: #008080"> 8</span> <span style="color: #000000">   <br /> </span><span style="color: #008080"> 9</span> <span style="color: #000000">    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">final</span><span style="color: #000000"> ApplicationStateManager appStateManager;<br /> </span><span style="color: #008080">10</span> <span style="color: #000000">   <br /> </span><span style="color: #008080">11</span> <span style="color: #000000">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> RequiresLoginFilter(PageRenderLinkSource renderLinkSource,<br /> </span><span style="color: #008080">12</span> <span style="color: #000000">            ComponentSource componentSource, Response response,<br /> </span><span style="color: #008080">13</span> <span style="color: #000000">            ApplicationStateManager appStateManager<br /> </span><span style="color: #008080">14</span> <span style="color: #000000">            ) {<br /> </span><span style="color: #008080">15</span> <span style="color: #000000">        </span><span style="color: #0000ff">this</span><span style="color: #000000">.renderLinkSource </span><span style="color: #000000">=</span><span style="color: #000000"> renderLinkSource;<br /> </span><span style="color: #008080">16</span> <span style="color: #000000">        </span><span style="color: #0000ff">this</span><span style="color: #000000">.componentSource </span><span style="color: #000000">=</span><span style="color: #000000"> componentSource;<br /> </span><span style="color: #008080">17</span> <span style="color: #000000">        </span><span style="color: #0000ff">this</span><span style="color: #000000">.response </span><span style="color: #000000">=</span><span style="color: #000000"> response;<br /> </span><span style="color: #008080">18</span> <span style="color: #000000">        </span><span style="color: #0000ff">this</span><span style="color: #000000">.appStateManager </span><span style="color: #000000">=</span><span style="color: #000000"> appStateManager;<br /> </span><span style="color: #008080">19</span> <span style="color: #000000">    }<br /> </span><span style="color: #008080">20</span> <span style="color: #000000"><br /> </span><span style="color: #008080">21</span> <span style="color: #000000">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> handleComponentEvent(<br /> </span><span style="color: #008080">22</span> <span style="color: #000000">            ComponentEventRequestParameters parameters,<br /> </span><span style="color: #008080">23</span> <span style="color: #000000">            ComponentRequestHandler handler) </span><span style="color: #0000ff">throws</span><span style="color: #000000"> IOException {<br /> </span><span style="color: #008080">24</span> <span style="color: #000000"><br /> </span><span style="color: #008080">25</span> <span style="color: #000000">        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (dispatchedToLoginPage(parameters.getActivePageName())) {<br /> </span><span style="color: #008080">26</span> <span style="color: #000000">            </span><span style="color: #0000ff">return</span><span style="color: #000000">;<br /> </span><span style="color: #008080">27</span> <span style="color: #000000">        }<br /> </span><span style="color: #008080">28</span> <span style="color: #000000"><br /> </span><span style="color: #008080">29</span> <span style="color: #000000">        handler.handleComponentEvent(parameters);<br /> </span><span style="color: #008080">30</span> <span style="color: #000000"><br /> </span><span style="color: #008080">31</span> <span style="color: #000000">    }<br /> </span><span style="color: #008080">32</span> <span style="color: #000000"><br /> </span><span style="color: #008080">33</span> <span style="color: #000000">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> handlePageRender(PageRenderRequestParameters parameters,<br /> </span><span style="color: #008080">34</span> <span style="color: #000000">            ComponentRequestHandler handler) </span><span style="color: #0000ff">throws</span><span style="color: #000000"> IOException {<br /> </span><span style="color: #008080">35</span> <span style="color: #000000">        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (dispatchedToLoginPage(parameters.getLogicalPageName())) {<br /> </span><span style="color: #008080">36</span> <span style="color: #000000">            </span><span style="color: #0000ff">return</span><span style="color: #000000">;<br /> </span><span style="color: #008080">37</span> <span style="color: #000000">        }<br /> </span><span style="color: #008080">38</span> <span style="color: #000000">        handler.handlePageRender(parameters);<br /> </span><span style="color: #008080">39</span> <span style="color: #000000"><br /> </span><span style="color: #008080">40</span> <span style="color: #000000">    }<br /> </span><span style="color: #008080">41</span> <span style="color: #000000"><br /> </span><span style="color: #008080">42</span> <span style="color: #000000">    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> dispatchedToLoginPage(String pageName) {<br /> </span><span style="color: #008080">43</span> <span style="color: #000000">        Component page </span><span style="color: #000000">=</span><span style="color: #000000"> componentSource.getPage(pageName);<br /> </span><span style="color: #008080">44</span> <span style="color: #000000">       <br /> </span><span style="color: #008080">45</span> <span style="color: #000000">        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (page.getClass().isAnnotationPresent(RequiresLogin.</span><span style="color: #0000ff">class</span><span style="color: #000000">)) {<br /> </span><span style="color: #008080">46</span> <span style="color: #000000">            </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( </span><span style="color: #000000">!</span><span style="color: #000000"> appStateManager.exists(Authentication.</span><span style="color: #0000ff">class</span><span style="color: #000000">)) {<br /> </span><span style="color: #008080">47</span> <span style="color: #000000">                redirect();<br /> </span><span style="color: #008080">48</span> <span style="color: #000000">                </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> </span><span style="color: #008080">49</span> <span style="color: #000000">            }<br /> </span><span style="color: #008080">50</span> <span style="color: #000000">            Authentication auth </span><span style="color: #000000">=</span><span style="color: #000000"> appStateManager.get(Authentication.</span><span style="color: #0000ff">class</span><span style="color: #000000">);<br /> </span><span style="color: #008080">51</span> <span style="color: #000000">            </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( auth </span><span style="color: #000000">==</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000"> ) {<br /> </span><span style="color: #008080">52</span> <span style="color: #000000">                redirect();<br /> </span><span style="color: #008080">53</span> <span style="color: #000000">                </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> </span><span style="color: #008080">54</span> <span style="color: #000000">            }<br /> </span><span style="color: #008080">55</span> <span style="color: #000000">           <br /> </span><span style="color: #008080">56</span> <span style="color: #000000">             </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( </span><span style="color: #000000">!</span><span style="color: #000000"> auth.isLoggedIn()) {<br /> </span><span style="color: #008080">57</span> <span style="color: #000000">                 redirect();<br /> </span><span style="color: #008080">58</span> <span style="color: #000000">                 </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> </span><span style="color: #008080">59</span> <span style="color: #000000">             }<br /> </span><span style="color: #008080">60</span> <span style="color: #000000"><br /> </span><span style="color: #008080">61</span> <span style="color: #000000">            RequiresLogin requireLogin </span><span style="color: #000000">=</span><span style="color: #000000"> page.getClass().getAnnotation(<br /> </span><span style="color: #008080">62</span> <span style="color: #000000">                    RequiresLogin.</span><span style="color: #0000ff">class</span><span style="color: #000000">);<br /> </span><span style="color: #008080">63</span> <span style="color: #000000">            String ifNotGranted </span><span style="color: #000000">=</span><span style="color: #000000"> requireLogin.ifNotGranted();<br /> </span><span style="color: #008080">64</span> <span style="color: #000000">            String ifAllGranted </span><span style="color: #000000">=</span><span style="color: #000000"> requireLogin.ifAllGranted();<br /> </span><span style="color: #008080">65</span> <span style="color: #000000">            String ifAnyGranted </span><span style="color: #000000">=</span><span style="color: #000000"> requireLogin.ifAnyGranted();<br /> </span><span style="color: #008080">66</span> <span style="color: #000000">            </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> permitted </span><span style="color: #000000">=</span><span style="color: #000000"> auth.checkPermission(ifNotGranted, ifAllGranted, ifAnyGranted);<br /> </span><span style="color: #008080">67</span> <span style="color: #000000">            </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( </span><span style="color: #000000">!</span><span style="color: #000000"> permitted ) {<br /> </span><span style="color: #008080">68</span> <span style="color: #000000">                </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> </span><span style="color: #008080">69</span> <span style="color: #000000">            }<br /> </span><span style="color: #008080">70</span> <span style="color: #000000">        }<br /> </span><span style="color: #008080">71</span> <span style="color: #000000"><br /> </span><span style="color: #008080">72</span> <span style="color: #000000">        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">;<br /> </span><span style="color: #008080">73</span> <span style="color: #000000">    }<br /> </span><span style="color: #008080">74</span> <span style="color: #000000">   <br /> </span><span style="color: #008080">75</span> <span style="color: #000000">    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> redirect() {<br /> </span><span style="color: #008080">76</span> <span style="color: #000000">         Link link </span><span style="color: #000000">=</span><span style="color: #000000"> renderLinkSource.createPageRenderLink(</span><span style="color: #000000">"</span><span style="color: #000000">Logout</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">77</span> <span style="color: #000000">       <br /> </span><span style="color: #008080">78</span> <span style="color: #000000">         </span><span style="color: #0000ff">try</span><span style="color: #000000"> {<br /> </span><span style="color: #008080">79</span> <span style="color: #000000">             response.sendRedirect(link);<br /> </span><span style="color: #008080">80</span> <span style="color: #000000">         } </span><span style="color: #0000ff">catch</span><span style="color: #000000"> (Exception e) {<br /> </span><span style="color: #008080">81</span> <span style="color: #000000">         }<br /> </span><span style="color: #008080">82</span> <span style="color: #000000">    }<br /> </span><span style="color: #008080">83</span> <span style="color: #000000"><br /> </span><span style="color: #008080">84</span> <span style="color: #000000">}</span></div> <br /> <p>鍦–omponentRequestFilter涓紝鎴戜滑鏃犳硶浣跨敤@SessionState娉ㄨВ鏉ョ洿鎺ユ敞鍏ession涓殑鍙橀噺錛屼絾鏄垜浠彲浠ラ氳繃ApplicationStateManager鏉ュ彇寰椼?/p> <p>鐜板湪鎴戜滑闇瑕佹妸鍒氬畾涔夌殑Filter娉ㄥ唽鍒扮郴緇熶腑錛屽緢綆鍗曪紝鍙鍦ˋppModule涓坊鍔犱互涓嬪嚱鏁板氨琛屼簡錛?/p> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><span style="color: #008080">1</span> <span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> contributeComponentRequestHandler(<br /> </span><span style="color: #008080">2</span> <span style="color: #000000">                OrderedConfiguration</span><span style="color: #000000"><</span><span style="color: #000000">ComponentRequestFilter</span><span style="color: #000000">></span><span style="color: #000000"> configuration) {<br /> </span><span style="color: #008080">3</span> <span style="color: #000000">        configuration.addInstance(</span><span style="color: #000000">"</span><span style="color: #000000">RequiresLogin</span><span style="color: #000000">"</span><span style="color: #000000">, RequiresLoginFilter.</span><span style="color: #0000ff">class</span><span style="color: #000000">);<br /> </span><span style="color: #008080">4</span> <span style="color: #000000">}<br /> </span><span style="color: #008080">5</span> </div> 浠庢湰渚嬪瓙涓垜浠彲浠ョ湅鍒癟apesty Ioc瀹瑰櫒浣跨敤鐨勪究鍒╂э紝涔熻璇嗗埌浜咺oc瀹瑰櫒鍦═apestry浣撶郴涓殑閲嶈鎬?img src ="http://www.tkk7.com/usherlight/aggbug/312016.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">浜戣嚜鏃犲績姘磋嚜闂?/a> 2010-02-04 19:17 <a href="http://www.tkk7.com/usherlight/archive/2010/02/04/312016.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Tapestry鏈鏂扮増5.1.0.5鏁欑▼錛堝叓錛夛細鏉冮檺鎺у埗妗嗘灦鐨勫疄鐜?鍩虹綃?/title><link>http://www.tkk7.com/usherlight/archive/2010/01/12/309226.html</link><dc:creator>浜戣嚜鏃犲績姘磋嚜闂?/dc:creator><author>浜戣嚜鏃犲績姘磋嚜闂?/author><pubDate>Tue, 12 Jan 2010 12:17:00 GMT</pubDate><guid>http://www.tkk7.com/usherlight/archive/2010/01/12/309226.html</guid><wfw:comment>http://www.tkk7.com/usherlight/comments/309226.html</wfw:comment><comments>http://www.tkk7.com/usherlight/archive/2010/01/12/309226.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/usherlight/comments/commentRss/309226.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/usherlight/services/trackbacks/309226.html</trackback:ping><description><![CDATA[Tapestry涓茍娌℃湁綾諱技浜嶴pring Security榪欐牱鐨勪笓闂ㄧ殑鏉冮檺妗嗘灦銆傚姝apestry鐨勪綔鑰匧ewis璁や負涓昏鏄敤鎴峰浜庢潈闄愮殑瑕佹眰瀹炲湪澶鍙樺寲浜嗐備粬璁や負寰堥毦鎶借薄鍑轟竴涓氱敤鐨勬潈闄愭鏋舵潵婊¤凍鎵鏈夌殑鐢ㄦ埛錛屾墍浠ヤ粬騫茶剢灝變笉璐逛簨鍘誨仛榪欎歡浜嬩簡銆備絾鍏跺疄鎴戜滑寰堝鏄撳氨鑳藉埄鐢═apestry宸叉湁鐨勫伐鍏鋒潵瀹屾垚綾諱技浜嶴pringSecurity鐨勫姛鑳姐?br /> 鏈枃涓昏浠嬬粛濡備綍瀹炵幇綾諱技浜嶴pringSecurity鐨刯sp tag鐨勫姛鑳姐傚湪Tapestry涓紝鍒╃敤Components瀹炵幇榪欎竴鐐歸潪甯稿鏄撱?br /> 鍏跺熀鏈師鐞嗘槸Tapestry5涓竴涓〉闈㈡垨鑰呯粍浠剁殑娓叉煋鐢熸垚榪囩▼鏄熀浜庝竴涓姸鎬佹満鍜岄槦鍒楀畬鎴愮殑銆傝繖鏍鳳紝娓叉煋鐢熸垚榪囩▼灝辮緇嗗垎鎴愪簡寰堝涓皬妯″潡錛屾垜浠彲浠ラ潪甯稿鏄撳湴瑕嗗啓榪欎簺灝忔ā鍧椼傚叿浣撳唴瀹硅瑙佸畼鏂規枃妗o細http://tapestry.apache.org/tapestry5.1/guide/rendering.html銆傚鏋滄潈闄愭牎楠屼笉閫氳繃錛屾垜浠氨鍙互鎺у埗涓嶆樉紺虹粍浠剁殑鍐呭銆?br /> 鎴戜滑榪欓噷灝辨槸涓昏渚濊禆榪欎釜榪囩▼鏉ュ疄鐜板湪欏甸潰榪欎竴灞傞潰瀵規潈闄愯繘琛屾牎楠屽拰鎺у埗銆?br /> 浠g爜涓昏鍖呭惈涓ゅぇ閮ㄥ垎錛屼竴涓粍浠跺拰涓涓敤浜庢潈闄愭帶鍒剁殑鏈嶅姟銆?br /> 鍙傝冧簡Tapestry-Spring-Security鐨勫疄鐜幫紝鎴戜篃灝嗙粍浠跺懡鍚嶄負IfRole錛堝綋鐒訛紝鎴戜滑涔熷彲浠ュ拰Tapestry-Spring-Security涓鏍鳳紝涔熷啀鐢熸垚涓涓狪fLoggedIn緇勪歡錛夈傛潈闄愭帶鍒剁殑鏈嶅姟鎴戝懡鍚嶄負錛欰uthenticationService銆?br /> 涓昏鐨勫疄鐜版濊礬錛?br /> 灝咥uthenticationService鐢蟲槑涓篠essionState鍙橀噺銆傝繖鏍瘋繖涓彉閲忓氨鍙互鍦ㄦ墍鏈夌殑欏甸潰鍜岀粍浠朵箣闂村緢鏂逛究鍦板叡浜簡銆備竴鑸儏鍐典笅錛屾槸鍦ㄧ櫥褰曢〉闈㈠AuthenticationService榪涜璧嬪鹼紝鑰屽湪閫鍑洪〉闈㈡竻絀篈uthenticationService榪欎釜鍙橀噺銆?br /> 浠g爜錛堣繖閮ㄥ垎浠g爜瀹屽叏鏍規嵁搴旂敤鐨勯渶姹傝繘鑷鏇存敼錛夛細<br /> AuthenticationService鐨勪唬鐮侊細<br /> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img id="Codehighlighter1_35_1600_Open_Image" onclick="this.style.display='none'; Codehighlighter1_35_1600_Open_Text.style.display='none'; Codehighlighter1_35_1600_Closed_Image.style.display='inline'; Codehighlighter1_35_1600_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_35_1600_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_35_1600_Closed_Text.style.display='none'; Codehighlighter1_35_1600_Open_Image.style.display='inline'; Codehighlighter1_35_1600_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" alt="" /><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> AuthenticationService </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_35_1600_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_35_1600_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> List</span><span style="color: #000000"><</span><span style="color: #000000">String</span><span style="color: #000000">></span><span style="color: #000000"> privilegeList;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> privilegeList 鐨刧etter and setter</span><span style="color: #008000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> checkPermission(String ifNotGranted, String ifAllGranted,<br /> <img id="Codehighlighter1_228_1598_Open_Image" onclick="this.style.display='none'; Codehighlighter1_228_1598_Open_Text.style.display='none'; Codehighlighter1_228_1598_Closed_Image.style.display='inline'; Codehighlighter1_228_1598_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_228_1598_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_228_1598_Closed_Text.style.display='none'; Codehighlighter1_228_1598_Open_Image.style.display='inline'; Codehighlighter1_228_1598_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />            String ifAnyGranted) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_228_1598_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_228_1598_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> (((</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">==</span><span style="color: #000000"> ifAllGranted) </span><span style="color: #000000">||</span><span style="color: #000000"> </span><span style="color: #000000">""</span><span style="color: #000000">.equals(ifAllGranted))<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />                </span><span style="color: #000000">&&</span><span style="color: #000000"> ((</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">==</span><span style="color: #000000"> ifAnyGranted) </span><span style="color: #000000">||</span><span style="color: #000000"> </span><span style="color: #000000">""</span><span style="color: #000000">.equals(ifAnyGranted))<br /> <img id="Codehighlighter1_437_473_Open_Image" onclick="this.style.display='none'; Codehighlighter1_437_473_Open_Text.style.display='none'; Codehighlighter1_437_473_Closed_Image.style.display='inline'; Codehighlighter1_437_473_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_437_473_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_437_473_Closed_Text.style.display='none'; Codehighlighter1_437_473_Open_Image.style.display='inline'; Codehighlighter1_437_473_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />                </span><span style="color: #000000">&&</span><span style="color: #000000"> ((</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">==</span><span style="color: #000000"> ifNotGranted) </span><span style="color: #000000">||</span><span style="color: #000000"> </span><span style="color: #000000">""</span><span style="color: #000000">.equals(ifNotGranted))) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_437_473_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_437_473_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />            </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />        }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img id="Codehighlighter1_540_830_Open_Image" onclick="this.style.display='none'; Codehighlighter1_540_830_Open_Text.style.display='none'; Codehighlighter1_540_830_Closed_Image.style.display='inline'; Codehighlighter1_540_830_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_540_830_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_540_830_Closed_Text.style.display='none'; Codehighlighter1_540_830_Open_Image.style.display='inline'; Codehighlighter1_540_830_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> ((</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">!=</span><span style="color: #000000"> ifNotGranted) </span><span style="color: #000000">&&</span><span style="color: #000000"> </span><span style="color: #000000">!</span><span style="color: #000000">""</span><span style="color: #000000">.equals(ifNotGranted)) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_540_830_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_540_830_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />            StringTokenizer st </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringTokenizer(ifNotGranted, </span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img id="Codehighlighter1_654_820_Open_Image" onclick="this.style.display='none'; Codehighlighter1_654_820_Open_Text.style.display='none'; Codehighlighter1_654_820_Closed_Image.style.display='inline'; Codehighlighter1_654_820_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_654_820_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_654_820_Closed_Text.style.display='none'; Codehighlighter1_654_820_Open_Image.style.display='inline'; Codehighlighter1_654_820_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />            </span><span style="color: #0000ff">while</span><span style="color: #000000"> (st.hasMoreTokens()) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_654_820_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_654_820_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />                String value </span><span style="color: #000000">=</span><span style="color: #000000"> st.nextToken();<br /> <img id="Codehighlighter1_754_806_Open_Image" onclick="this.style.display='none'; Codehighlighter1_754_806_Open_Text.style.display='none'; Codehighlighter1_754_806_Closed_Image.style.display='inline'; Codehighlighter1_754_806_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_754_806_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_754_806_Closed_Text.style.display='none'; Codehighlighter1_754_806_Open_Image.style.display='inline'; Codehighlighter1_754_806_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (privilegeList.contains(value)) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_754_806_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_754_806_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />                    </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />                }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />            }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />        }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img id="Codehighlighter1_897_1188_Open_Image" onclick="this.style.display='none'; Codehighlighter1_897_1188_Open_Text.style.display='none'; Codehighlighter1_897_1188_Closed_Image.style.display='inline'; Codehighlighter1_897_1188_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_897_1188_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_897_1188_Closed_Text.style.display='none'; Codehighlighter1_897_1188_Open_Image.style.display='inline'; Codehighlighter1_897_1188_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> ((</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">!=</span><span style="color: #000000"> ifAllGranted) </span><span style="color: #000000">&&</span><span style="color: #000000"> </span><span style="color: #000000">!</span><span style="color: #000000">""</span><span style="color: #000000">.equals(ifAllGranted)) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_897_1188_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_897_1188_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />            StringTokenizer st </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringTokenizer(ifAllGranted, </span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img id="Codehighlighter1_1011_1178_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1011_1178_Open_Text.style.display='none'; Codehighlighter1_1011_1178_Closed_Image.style.display='inline'; Codehighlighter1_1011_1178_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1011_1178_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1011_1178_Closed_Text.style.display='none'; Codehighlighter1_1011_1178_Open_Image.style.display='inline'; Codehighlighter1_1011_1178_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />            </span><span style="color: #0000ff">while</span><span style="color: #000000"> (st.hasMoreTokens()) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1011_1178_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1011_1178_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />                String value </span><span style="color: #000000">=</span><span style="color: #000000"> st.nextToken();<br /> <img id="Codehighlighter1_1112_1164_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1112_1164_Open_Text.style.display='none'; Codehighlighter1_1112_1164_Closed_Image.style.display='inline'; Codehighlighter1_1112_1164_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1112_1164_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1112_1164_Closed_Text.style.display='none'; Codehighlighter1_1112_1164_Open_Image.style.display='inline'; Codehighlighter1_1112_1164_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #000000">!</span><span style="color: #000000">privilegeList.contains(value)) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1112_1164_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1112_1164_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />                    </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />                }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />            }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />        }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img id="Codehighlighter1_1255_1570_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1255_1570_Open_Text.style.display='none'; Codehighlighter1_1255_1570_Closed_Image.style.display='inline'; Codehighlighter1_1255_1570_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1255_1570_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1255_1570_Closed_Text.style.display='none'; Codehighlighter1_1255_1570_Open_Image.style.display='inline'; Codehighlighter1_1255_1570_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />        </span><span style="color: #0000ff">if</span><span style="color: #000000"> ((</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">!=</span><span style="color: #000000"> ifAnyGranted) </span><span style="color: #000000">&&</span><span style="color: #000000"> </span><span style="color: #000000">!</span><span style="color: #000000">""</span><span style="color: #000000">.equals(ifAnyGranted)) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1255_1570_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1255_1570_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />            StringTokenizer st </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringTokenizer(ifAnyGranted, </span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> <img id="Codehighlighter1_1369_1534_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1369_1534_Open_Text.style.display='none'; Codehighlighter1_1369_1534_Closed_Image.style.display='inline'; Codehighlighter1_1369_1534_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1369_1534_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1369_1534_Closed_Text.style.display='none'; Codehighlighter1_1369_1534_Open_Image.style.display='inline'; Codehighlighter1_1369_1534_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />            </span><span style="color: #0000ff">while</span><span style="color: #000000"> (st.hasMoreTokens()) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1369_1534_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1369_1534_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />                String value </span><span style="color: #000000">=</span><span style="color: #000000"> st.nextToken();<br /> <img id="Codehighlighter1_1469_1520_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1469_1520_Open_Text.style.display='none'; Codehighlighter1_1469_1520_Closed_Image.style.display='inline'; Codehighlighter1_1469_1520_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1469_1520_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1469_1520_Closed_Text.style.display='none'; Codehighlighter1_1469_1520_Open_Image.style.display='inline'; Codehighlighter1_1469_1520_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (privilegeList.contains(value)) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1469_1520_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1469_1520_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />                    </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />                }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />            }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />            </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />        }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">true</span><span style="color: #000000">;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span></div> <br /> IfRole鐨勪唬鐮侊紙榪欎釜綾婚渶瑕佹斁鍦–omponents鐩綍涓嬶級錛?br /> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img id="Codehighlighter1_20_1570_Open_Image" onclick="this.style.display='none'; Codehighlighter1_20_1570_Open_Text.style.display='none'; Codehighlighter1_20_1570_Closed_Image.style.display='inline'; Codehighlighter1_20_1570_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_20_1570_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_20_1570_Closed_Text.style.display='none'; Codehighlighter1_20_1570_Open_Image.style.display='inline'; Codehighlighter1_20_1570_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" alt="" /><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> IfRole </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_20_1570_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_20_1570_Open_Text"><span style="color: #000000">{<br /> <img id="Codehighlighter1_26_246_Open_Image" onclick="this.style.display='none'; Codehighlighter1_26_246_Open_Text.style.display='none'; Codehighlighter1_26_246_Closed_Image.style.display='inline'; Codehighlighter1_26_246_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_26_246_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_26_246_Closed_Text.style.display='none'; Codehighlighter1_26_246_Open_Image.style.display='inline'; Codehighlighter1_26_246_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_26_246_Closed_Text">/** */</span><span id="Codehighlighter1_26_246_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * A comma-separated list of roles is supplied to one or more of the<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * following parameters. If none are supplied, the default behavior is to<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * forbid access. Behavior should be self-explanatory.<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    @Parameter(required </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">, defaultPrefix </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">literal</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> String ifAllGranted;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    @Parameter(required </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">, defaultPrefix </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">literal</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> String ifAnyGranted;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    @Parameter(required </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">false</span><span style="color: #000000">, defaultPrefix </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">literal</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> String ifNotGranted;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img id="Codehighlighter1_534_686_Open_Image" onclick="this.style.display='none'; Codehighlighter1_534_686_Open_Text.style.display='none'; Codehighlighter1_534_686_Closed_Image.style.display='inline'; Codehighlighter1_534_686_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_534_686_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_534_686_Closed_Text.style.display='none'; Codehighlighter1_534_686_Open_Image.style.display='inline'; Codehighlighter1_534_686_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_534_686_Closed_Text">/** */</span><span id="Codehighlighter1_534_686_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * An alternate {</span><span style="color: #808080">@link</span><span style="color: #008000"> Block} to render if the test parameter is false. The default, null, means<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * render nothing in that situation.<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    @Parameter(name </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">else</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> Block elseBlock;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> test;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />   <br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    @SessionState<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> AuthenticationService auth;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img id="Codehighlighter1_875_960_Open_Image" onclick="this.style.display='none'; Codehighlighter1_875_960_Open_Text.style.display='none'; Codehighlighter1_875_960_Closed_Image.style.display='inline'; Codehighlighter1_875_960_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_875_960_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_875_960_Closed_Text.style.display='none'; Codehighlighter1_875_960_Open_Image.style.display='inline'; Codehighlighter1_875_960_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> checkPermission() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_875_960_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_875_960_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> auth.checkPermission(ifNotGranted, ifAllGranted, ifAnyGranted);<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />   <br /> <img id="Codehighlighter1_989_1029_Open_Image" onclick="this.style.display='none'; Codehighlighter1_989_1029_Open_Text.style.display='none'; Codehighlighter1_989_1029_Closed_Image.style.display='inline'; Codehighlighter1_989_1029_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_989_1029_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_989_1029_Closed_Text.style.display='none'; Codehighlighter1_989_1029_Open_Image.style.display='inline'; Codehighlighter1_989_1029_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="color: #0000ff">void</span><span style="color: #000000"> setupRender() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_989_1029_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_989_1029_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />        test </span><span style="color: #000000">=</span><span style="color: #000000"> checkPermission();<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img id="Codehighlighter1_1036_1242_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1036_1242_Open_Text.style.display='none'; Codehighlighter1_1036_1242_Closed_Image.style.display='inline'; Codehighlighter1_1036_1242_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1036_1242_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1036_1242_Closed_Text.style.display='none'; Codehighlighter1_1036_1242_Open_Image.style.display='inline'; Codehighlighter1_1036_1242_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1036_1242_Closed_Text">/** */</span><span id="Codehighlighter1_1036_1242_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * Returns null if the test method returns true, which allows normal<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * rendering (of the body). If the test parameter is false, returns the else<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * parameter (this may also be null).<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_1269_1315_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1269_1315_Open_Text.style.display='none'; Codehighlighter1_1269_1315_Closed_Image.style.display='inline'; Codehighlighter1_1269_1315_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1269_1315_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1269_1315_Closed_Text.style.display='none'; Codehighlighter1_1269_1315_Open_Image.style.display='inline'; Codehighlighter1_1269_1315_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    Object beginRender() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1269_1315_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1269_1315_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> test </span><span style="color: #000000">?</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000"> : elseBlock;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img id="Codehighlighter1_1322_1504_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1322_1504_Open_Text.style.display='none'; Codehighlighter1_1322_1504_Closed_Image.style.display='inline'; Codehighlighter1_1322_1504_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1322_1504_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1322_1504_Closed_Text.style.display='none'; Codehighlighter1_1322_1504_Open_Image.style.display='inline'; Codehighlighter1_1322_1504_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1322_1504_Closed_Text">/** */</span><span id="Codehighlighter1_1322_1504_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * If the test method returns true, then the body is rendered, otherwise not. The component does<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />     * not have a template or do any other rendering besides its body.<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_1537_1564_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1537_1564_Open_Text.style.display='none'; Codehighlighter1_1537_1564_Closed_Image.style.display='inline'; Codehighlighter1_1537_1564_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_1537_1564_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1537_1564_Closed_Text.style.display='none'; Codehighlighter1_1537_1564_Open_Image.style.display='inline'; Codehighlighter1_1537_1564_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="color: #0000ff">boolean</span><span style="color: #000000"> beforeRenderBody() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1537_1564_Closed_Text"><img src="http://www.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1537_1564_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> test;<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />   <br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span></div> <br /> <br /> <p>紺轟緥錛?br /> 1. 鍦ㄧ櫥褰曢〉闈細<br /> @SessionState<br /> private Authentication auth;</p> <p>......</p> <p>// if user name and password is valid:<br /> auth.setPrivliegeList(.....);<br /> <br /> <br /> </p> <p>2. 鍦ㄩ渶瑕佹潈闄愭帶鍒剁殑欏甸潰妯℃澘涓細<br /> <t:ifRole ifAllGranted="admin"><br />         administrator can see this block<br /> </t:ifRole></p><img src ="http://www.tkk7.com/usherlight/aggbug/309226.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/usherlight/" target="_blank">浜戣嚜鏃犲績姘磋嚜闂?/a> 2010-01-12 20:17 <a href="http://www.tkk7.com/usherlight/archive/2010/01/12/309226.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://nzzys.com" target="_blank">亚洲黄色免费网址</a>| <a href="http://fense1.com" target="_blank">羞羞视频在线观看免费</a>| <a href="http://jxgsgg.com" target="_blank">日韩免费毛片视频</a>| <a href="http://yuase.com" target="_blank">成年女人A毛片免费视频</a>| <a href="http://mangshigas.com" target="_blank">亚洲欧洲一区二区</a>| <a href="http://6006769.com" target="_blank">国产精品无码免费视频二三区</a>| <a href="http://6668889.com" target="_blank">国产精品永久免费</a>| <a href="http://nonobo.com" target="_blank">天天爽亚洲中文字幕</a>| <a href="http://9156892.com" target="_blank">亚洲日韩中文字幕日韩在线</a>| <a href="http://616kb.com" target="_blank">91成人免费观看</a>| <a href="http://922eee.com" target="_blank">美女视频黄a视频全免费网站色</a>| <a href="http://www1688mz.com" target="_blank">国产国拍亚洲精品mv在线观看</a>| <a href="http://eddiekidd.com" target="_blank">成人男女网18免费视频</a>| <a href="http://fkg675.com" target="_blank">a级毛片高清免费视频就</a>| <a href="http://591se591se.com" target="_blank">国产精品亚洲专区在线观看 </a>| <a href="http://bentuxinli.com" target="_blank">亚洲日韩av无码</a>| <a href="http://kouchoubao.com" target="_blank">91在线品视觉盛宴免费</a>| <a href="http://deyingwh.com" target="_blank">99久久婷婷免费国产综合精品</a>| <a href="http://1880531.com" target="_blank">亚洲一区二区三区高清不卡</a>| <a href="http://xfmkt.com" target="_blank">久久九九亚洲精品</a>| <a href="http://726kxw.com" target="_blank">国产一级淫片a免费播放口之</a>| <a href="http://3hc88.com" target="_blank">91av免费观看</a>| <a href="http://kyqp0022.com" target="_blank">国产无遮挡色视频免费观看性色 </a>| <a href="http://grjeans.com" target="_blank">免费高清国产视频</a>| <a href="http://siqingsizu.com" target="_blank">丰满亚洲大尺度无码无码专线</a>| <a href="http://zhuoyueyc.com" target="_blank">亚洲国产精品自在在线观看</a>| <a href="http://fanhaogo.com" target="_blank">又色又污又黄无遮挡的免费视 </a>| <a href="http://www-7607.com" target="_blank">暖暖免费日本在线中文</a>| <a href="http://mosason.com" target="_blank">国产精品久久亚洲一区二区</a>| <a href="http://bixnu.com" target="_blank">亚洲精品福利网泷泽萝拉</a>| <a href="http://4husese.com" target="_blank">亚洲无码视频在线</a>| <a href="http://www-60060.com" target="_blank">在线日韩av永久免费观看</a>| <a href="http://tv787.com" target="_blank">1000部拍拍拍18勿入免费凤凰福利</a>| <a href="http://xx2e.com" target="_blank">久久久久久久久久免免费精品 </a>| <a href="http://zz198.com" target="_blank">日韩吃奶摸下AA片免费观看</a>| <a href="http://50077995.com" target="_blank">a级毛片高清免费视频</a>| <a href="http://448tk.com" target="_blank">一级毛片人与动免费观看</a>| <a href="http://zbvip888.com" target="_blank">亚洲av永久中文无码精品</a>| <a href="http://www4438xx2.com" target="_blank">亚洲成a人片在线观看中文app</a>| <a href="http://zgxxx.com" target="_blank">亚洲第一极品精品无码久久</a>| <a href="http://mtspvip.com" target="_blank">亚洲日韩在线观看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>