<div>SessionScope$B$r;H$C$FG'>Z%A%'%C%/$r9T$J$&%5%s%W%k$b:n@.$7$^$7$?$,!"(B</div>
<div>$B$=$N>l9g$O!"4D6-(B1$B!"4D6-(B2$B$H$b@5>o$KF0:n$7$^$7$?!#(B<br><br> </div>
<div><span class="gmail_quote">07/06/06 $B$K(B <b class="gmail_sendername">Kenji Yamaguchi</b> <<a href="mailto:k.yamaguchi@ts.infocom.co.jp">k.yamaguchi@ts.infocom.co.jp</a>> $B$5$s$O=q$-$^$7$?(B:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">$B$*@$OC$K$J$j$^$9!#(B<br>$B;38}$G$9!#(B<br><br>$B$3$N7o!"$O(B<br><a href="https://www.seasar.org/issues/browse/TEEDA-305">https://www.seasar.org/issues/browse/TEEDA-305
</a><br>$B$NLdBj$G$O$J$$$G$7$g$&$+!)(B<br>$B0c$C$F$$$?$i$9$$$^$;$s!#(B<br><br>-----Original Message-----<br>From: <a href="mailto:seasar-user-bounces@ml.seasar.org">seasar-user-bounces@ml.seasar.org</a> [mailto:<a href="mailto:seasar-user-bounces@ml.seasar.org">
seasar-user-bounces@ml.seasar.org</a>] On Behalf Of Shinpei Ohtani<br>Sent: Wednesday, June 06, 2007 10:09 AM<br>To: <a href="mailto:seasar-user@ml.seasar.org">seasar-user@ml.seasar.org</a><br>Subject: [Seasar-user:8094] Re:S2Container$B$H(BTeeda$B$N%P!<%8%g%s$rJQ99$9$k$H(BInterceptor$B$K(BDI$B$5$l$^$;$s(B
<br><br>$BBgC+$G$9!#(B<br><br>$B$O$:$7$F$$$k$+$b$7$l$^$;$s$,!"(B<br>$B!&(BLoginInterceptor2 $B$OK\Ev$KF0$$$F$$$^$9$G$7$g$&$+!)(B<br>$B%G%P%C%0%]%$%s%H$r$"$F$F$_$F$/$@$5$$!#(B<br>$B!&(Bcustomizer.dicon$B$,2?$+$*$+$7$$$+$b$7$l$^$;$s!#(B<br>$B$3$A$i$O8+$;$F$$$?$@$1$l$P2?$+$o$+$k$+$b$7$l$^$;$s!#(B<br>$B!&4D6-(B2$B$G(BTeeda$B$d(BS2$B$N8E$$(Bjar$B$,(BWEB-INF$B$N2<$K;D$C$F$$$?$j$7$^$;$s$+!)(B<br><br><br>
<br>07/06/06 $B$K(B $B55ED0lO:(B<<a href="mailto:kameda.ichiro@gmail.com">kameda.ichiro@gmail.com</a>> $B$5$s$O=q$-$^$7$?(B:<br>> $B55ED$H?=$7$^$9!#(B<br>> $B=i$a$FEj9F$7$^$9!#(B<br>> $B59$7$/$*4j$$$7$^$9!#(B<br>><br>> AOP$B$K$h$kG'>Z%A%'%C%/$N%5%s%W%k$r:n$C$F$$$^$9!#(B<br>> S2Container$B$H(BTeeda$B$N%P!<%8%g%s$rJQ99$7$?$i!"(B
<br>> $B%W%m%0%i%`$,@5>o$KF0:n$7$J$/$J$j!"860x$,J,$+$j$^$;$s!#(B<br>> $B3'MM$N$465<($r;r$j$?$/Ej9F$7$^$7$?!#(B<br>><br>> $B"#4D6-(B1(S2Container-2.4.10$B$H(BTeeda-1.0.4)<br>> s2-extension-2.4.10.jar,s2-framework-2.4.10.jar,s2-tiger-2.4.10.jar<br>> teeda-core-1.0.4.jar
,teeda-extension-1.0.4.jar,teeda-tiger-1.0.4.jar<br>> $BB>B??t(B<br>><br>> $B"#4D6-(B2(S2Container-2.4.13$B$H(BTeeda-1.0.7)<br>> s2-extension-2.4.13.jar,s2-framework-2.4.13.jar,s2-tiger-2.4.13.jar<br>> teeda-ajax-1.0.7.jar,
teeda-core-1.0.7.jar,teeda-extension-1.0.7.jar,teeda-tiger-1.0.7.jar<br>> $BB>B??t(B<br>><br>> $B"#%W%m%0%i%`9=@.(B<br>> LoginInterceptor2.java<br>> LoginUserDto.java @Component(instance = InstanceType.SESSION)$B$G(B<br>> $B%;%C%7%g%s$KJ]4I(B
<br>> login2.html ---->Login2Page.java<br>><br>> $B%m%0%*%U$O(B@RemoveSession(name="loginUserDto")<br>> logincheck2.html---->Logincheck2Page.java<br>><br>> $B"#%F%9%H$N35MW(B<br>> $B!&(Blogin2.html$B$GF~NO$7$?%m%0%$%s>pJs$r(BLogin2Page$B$G%A%'%C%/$7(B
<br>> $B7k2L$r(BLoginUserDto$B$K%;%C%H$7!"%;%C%7%g%s$KJ]4I$7$^$9!#(B<br>> $B!&(Blogincheck2.html$B$O%F%9%HMQ(Bhtml$B$G!"2hLL>e$N(Bsubmit$B%\%?%s$r(B<br>> $B2!2<$9$k$H(BLogincheck2Page$B$N(BdoAuth()$B%a%=%C%I$r8F$S=P$7$^$9!#(B<br>> $B!&(BdoAuth()$B%a%=%C%I$K$O(BAOP$B$,E,MQ$5$l$F$*$j!"(BLoginInterceptor2$B$,(B<br>> LoginUserDto$B$N%m%0%$%s>pJs$r%A%'%C%/$7!"G'>Z(BOK$B$H%(%i!<$K(B
<br>> $BBP1~$7$F2hLL$KA+0\$7$^$9!#(B<br>><br>> $B"#4D6-(B1$B$O@5>o$KF0:n$7$^$9!#(B<br>><br>> $B"#4D6-(B2$B$N>l9g!"(B<br>><br>> 1.LoginInterceptor2$B$K(BLoginUserDto$B$,(BDI$B$5$l$J$$(B(null)$B$?$a!">o$KG'>Z%(%i!<$K$J$j$^$9(B<br>> Logincheck2Page$B$K$O(BDI$B$5$l$^$9(B<br>> 2.Login2Page$B$N%m%0%*%U$G(BLoginUserDto$B$,%;%C%7%g%s$+$i:o=|$5$l$^$;$s(B
<br>> @RemoveSession(name="loginUserDto")$B$,Mx$+$J$$(B<br>><br>> $B"#%=!<%9(B<br>><br>> $B!Z(BLoginInterceptor2$B![(B<br>> package test.interceptor;<br>><br>> $B!D(B $B>JN,(B $B!D(B<br>><br>> public class LoginInterceptor2 implements MethodInterceptor {
<br>><br>> private LoginUserDto loginUserDto;<br>><br>> public void setLoginUserDto(LoginUserDto loginUserDto){<br>> this.loginUserDto = loginUserDto; }<br>><br>> public Object invoke(MethodInvocation invocation) throws Throwable {
<br>><br>> if(loginUserDto!=null){<br>> if(loginUserDto.isAuthed()){<br>> System.out.println("@@@@@@@@@ $BA0(B");<br>> Object obj = invocation.proceed();<br>>
System.out.println("@@@@@@@@@ $B8e(B");<br>> return obj;<br>> }<br>> }<br>> return "error";<br>> }<br>> }<br>><br>> $B!Z(BLoginUserDto$B![(B<br>> package test.web.dto
;<br>> import org.seasar.framework.container.annotation.tiger.*;<br>><br>> @Component(instance = InstanceType.SESSION) public class LoginUserDto<br>> {<br>> private String userId;<br>> private boolean authed;
<br>> public String getUserId() { return userId; }<br>> public void setUserId(String userId) { this.userId = userId; }<br>> public boolean isAuthed() { return authed; }
<br>> public void setAuthed(boolean authed) { this.authed = authed; }<br>> }<br>><br>> $B!Z(BLogin2Page$B![(B<br>><br>> package test.web.login2;<br>><br>> $B!D(B $B>JN,(B $B!D(B<br>><br>> public class Login2Page {
<br>><br>> private String userId;<br>> private String password;<br>> private boolean loggedin=true;<br>> private String loginMsg = "$B=i4|%a%C%;!<%8(B";<br>><br>> private LoginUserDto loginUserDto;
<br>><br>> $B!D(B $B>JN,(B $B!D(B(setter/getter)<br>><br>> public void setLoginUserDto(LoginUserDto loginUserDto) {<br>> this.loginUserDto = loginUserDto;<br>> }<br>><br>> public String doLogin() {<br>
> System.out.println("#### start doLogin() ####");<br>> if(userId.equals("user") && password.equals("user")) {<br>> loginUserDto.setAuthed(true);<br>>
loginUserDto.setUserId(userId);<br>> loginMsg = "$B%m%0%$%s@.8y(B";<br>> loggedin = true;<br>> return "success";<br>> } else {<br>> loginUserDto.setAuthed(false);<br>> loginMsg = "$B%m%0%$%s<:GT(B";
<br>> loggedin = false;<br>> return "error";<br>> }<br>><br>> }<br>><br>> @RemoveSession(name="loginUserDto")<br>> public String doLogout() {<br>> System.out.println
("#### start doLogout() ####");<br>> return null;<br>> }<br>><br>> public String prerender() {<br>> System.out.println("#### start prerender() ####");<br>><br>> if(
loginUserDto.isAuthed()) {<br>> loggedin = true;<br>> } else {<br>> loggedin = false;<br>> }<br>> return null;<br>> }<br>> }<br>><br>> $B!Z(BLogincheck2Page$B![(B<br>><br>> package
test.web.logincheck2;<br>><br>> $B!D(B $B>JN,(B $B!D(B<br>><br>> public class Logincheck2Page {<br>><br>> $B!D(B $B>JN,(B $B!D(B<br>><br>> private LoginUserDto loginUserDto;<br>> public void setLoginUserDto(LoginUserDto loginUserDto){
<br>> his.loginUserDto = loginUserDto ;<br>> }<br>><br>> public String initialize(){<br>> System.out.println("##### Start initialize() #####");<br>> statMsg="$B%m%0%$%s>5G'L$:Q(B";
<br>> if(loginUserDto!=null){<br>> if(loginUserDto!=null){<br>> if(loginUserDto.isAuthed ()){<br>> statMsg="$B%m%0%$%s>5G':Q$_(B";<br>> }<br>> }<br>> }<br>> return null;
<br>> }<br>> public String doAuth() {<br>> System.out.println("##### Start doAuth() #####");<br>> return null;<br>> }<br>> }<br>><br>><br>><br>><br>><br>> _______________________________________________
<br>> Seasar-user mailing list<br>> <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>> <a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user
</a><br>><br>><br><br><br>--<br>=============================<br>Shinpei Ohtani<br><a href="mailto:shinpei.ohtani@gmail.com">shinpei.ohtani@gmail.com</a><br>=============================<br>_______________________________________________
<br>Seasar-user mailing list<br><a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br><a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user</a>
<br><br><br>_______________________________________________<br>Seasar-user mailing list<br><a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br><a href="https://ml.seasar.org/mailman/listinfo/seasar-user">
https://ml.seasar.org/mailman/listinfo/seasar-user</a><br></blockquote></div><br>