[Seasar-user:9489] Re: [Teeda] 1.0.8でdoOnceが呼ばれない

Junichi Kato [E-MAIL ADDRESS DELETED]
2007年 7月 27日 (金) 00:25:46 JST


加藤です.

長々とすみません.
requestDumpFilterのログを取ってみました.

doLoginは呼ばれるのですが,doOnceLoginに切り替えるとなぜか呼ばれなくなり
ます.
確認事項などあればアドバイスいただければ幸いです.
よろしくお願いいたします.

** before *****************************************: /view/admin/adminLogin.html
  Request class=org.apache.catalina.connector.RequestFacade, instance=[E-MAIL ADDRESS DELETED]
  RequestedSessionId=8A3652A7655960EC1A147358409E74F4
  REQUEST_URI=/bookrental/view/admin/adminLogin.html, SERVLET_PATH=/view/admin/adminLogin.html
  CharacterEncoding=UTF-8, ContentLength=139, ContentType=application/x-www-form-urlencoded, Locale=ja, Locales=ja, Scheme=http, isSecure=false
  SERVER_PROTOCOL=HTTP/1.1, REMOTE_ADDR=0:0:0:0:0:0:0:1, REMOTE_HOST=0:0:0:0:0:0:0:1, SERVER_NAME=localhost, SERVER_PORT=8080
  ContextPath=/bookrental, REQUEST_METHOD=POST, QUERY_STRING=null, PathInfo=null, RemoteUser=null
  Session SessionId=8A3652A7655960EC1A147358409E74F4
  Session :: CreationTime=1185463088399, LastAccessedTime=1185463229311, MaxInactiveInterval=1800
  [param]loginForm/view/admin/adminLogin.html=loginForm
  [param]loginForm:accountName=admin
  [param]loginForm:doOnceLogin=Login
  [param]loginForm:password=admin
  [request]org.seasar.framework.container.hotdeploy.HotdeployFilter=[E-MAIL ADDRESS DELETED]
  [cookie]JSESSIONID=8A3652A7655960EC1A147358409E74F4
  [header]accept=*/*
  [header]accept-encoding=gzip, deflate
  [header]accept-language=ja
  [header]cache-control=no-cache
  [header]connection=Keep-Alive
  [header]content-length=139
  [header]content-type=application/x-www-form-urlencoded
  [header]cookie=JSESSIONID=8A3652A7655960EC1A147358409E74F4
  [header]host=localhost:8080
  [header]referer=http://localhost:8080/bookrental/view/admin/adminLogin.html
  [header]ua-cpu=x86
  [header]user-agent=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
  [session]accountDto=[E-MAIL ADDRESS DELETED]
  [session]javax.faces.internal.scope.PageScope={}
  [session]javax.faces.internal.scope.RedirectScope={}
  [session]javax.faces.internal.scope.SubApplicationScope={}
  [session]javax.faces.request.charset=UTF-8
  [session]org.seasar.teeda.core.lifecycle.impl.RestoreViewPhase.VIEW_ID_LRU={null=/view/admin/adminLogin.html}
  [context]javax.servlet.context.tempdir=C:\java_develop_env\eclipse_3.2.2\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\bookrental
  [context]org.apache.catalina.WELCOME_FILES=[Ljava.lang.String;@bed4c8
<snip>
[context]org.apache.catalina.resources=org.apache.naming.resources.Pro
[E-MAIL ADDRESS DELETED]
  [context]org.seasar.teeda.core.config.webapp.element.WebappConfig=[E-MAIL ADDRESS DELETED]

DEBUG 2007-07-27 00:20:36,317 [http-8080-Processor22] クラス(bookrental.web.admin.AdminLoginPage[admin_adminLoginPage])のコンポーネント定義を登録します
DEBUG 2007-07-27 00:20:36,385 [http-8080-Processor22] クラス(bookrental.dao.AccountMasterDao[accountMasterDao])のコンポーネント定義を登録します
DEBUG 2007-07-27 00:20:36,437 [http-8080-Processor22] クラス(bookrental.dto.AccountDto[accountDto])のコンポーネント定義を登録します
DEBUG 2007-07-27 00:20:36,443 [http-8080-Processor22] トランザクションを開始しました
DEBUG 2007-07-27 00:20:36,443 [http-8080-Processor22] トランザクションをコミットしました
DEBUG 2007-07-27 00:20:36,452 [http-8080-Processor22] 

** after *****************************************: /view/admin/adminLogin.html
  Response class=org.apache.catalina.connector.ResponseFacade, instance=[E-MAIL ADDRESS DELETED]
  [request]admin_adminLoginPage=bookrental.web.admin.AdminLoginPage$$EnhancedByS2AOP$$[E-MAIL ADDRESS DELETED]
  [request]facesContext=[E-MAIL ADDRESS DELETED]
  [request]javax.faces.webapp.GLOBAL_ID_VIEW={}
  [request]javax.servlet.jsp.jstl.fmt.locale.request=ja_JP
  [request]org.seasar.framework.container.hotdeploy.HotdeployFilter=[E-MAIL ADDRESS DELETED]
  [request]org.seasar.teeda.core.lifecycle.LifecycleImpl.EXECUTED=org.seasar.teeda.core.lifecycle.LifecycleImpl.EXECUTED
  [request]org.seasar.teeda.extension.render.html.THtmlHeadRenderer.CSS_KEY=[]
  [request]org.seasar.teeda.extension.render.html.THtmlHeadRenderer.INLINE_CSS_KEY={}
  [request]org.seasar.teeda.extension.render.html.THtmlHeadRenderer.INLINE_JS_KEY={}
  [request]org.seasar.teeda.extension.render.html.THtmlHeadRenderer.JS_KEY=[]
  [request]postback=true
  [request]previousViewId=/view/admin/adminLogin.html
  [request]teeda.SUBMITTED_COMMAND=doOnceLogin
  [cookie]JSESSIONID=8A3652A7655960EC1A147358409E74F4
  [session]accountDto=[E-MAIL ADDRESS DELETED]
  [session]javax.faces.internal.scope.PageScope={}
  [session]javax.faces.internal.scope.RedirectScope={}
  [session]javax.faces.internal.scope.SubApplicationScope={}
  [session]javax.faces.request.charset=UTF-8
  [session]org.seasar.teeda.core.lifecycle.impl.RestoreViewPhase.VIEW_ID_LRU={null=/view/admin/adminLogin.html}
  [context]javax.servlet.context.tempdir=C:\java_develop_env\eclipse_3.2.2\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\bookrental
  [context]org.apache.catalina.WELCOME_FILES=[Ljava.lang.String;@bed4c8
<snip>
  [context]org.apache.catalina.resources=[E-MAIL ADDRESS DELETED]
  [context]org.seasar.teeda.core.config.webapp.element.WebappConfig=[E-MAIL ADDRESS DELETED]


On Thu, 26 Jul 2007 16:48:18 +0900
Junichi Kato <[E-MAIL ADDRESS DELETED]> wrote:

> 加藤です.
> 
> Java5
> S2.4.14
> Teeda 1.0.8
> の環境にて,
> 
> 以下のようなフォームとPageクラスで,doOnceLoginを実現しようとしているの
> ですが,いっこうに呼ばれません.doLoginは問題なく使えます.
> 
> 何か問題になりそうな箇所はありますでしょうか?
> 
> ちなみに,teeda-html-exampleのadd.htmlのdoOnceメソッドは問題なく実行でき
> ていました.htmlタグの囲み方の問題などあるのでしょうか?
> アドバイスいただけば幸いです.
> 
> 
> ソース全体はここにあります.
> https://office.grandtech.jp/svn/learning/bookrental/
> 実行するには,一度,mvn compileして依存jarをダウンロードする必要あります.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:te="http://www.seasar.org/teeda/extension" xml:lang="ja" lang="ja">
> <head>
> 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> 	<meta http-equiv="Pragma" content="no-cache"/>
> 	<link rel="stylesheet" type="text/css" href="../../css/common.css"/>
> 	<title id="pageTitle">管理者ログイン</title>
> </head>
> <body>
> 	
> <div id="wrapper">
> 	<!-- header Start -->
> 	<div id="header">
> 	<p class="Logo"><img src="../../images/Logo.gif" width="250" height="50" alt=""/></p>
> 	<h1>管理者ログイン</h1>
> 	</div>
> 	<!-- header End -->
> 	
> 	<div id="container">
> 		<div id="primary">
> 			<div id="content">
> 				<form id="loginForm" class="LoginForm">
> 					<table cellpadding="0" cellspacing="0" class="LoginTable">
> 					<tbody>
> 					<tr>
> 						<td class="error" colspan="2"><span id="allMessages"></span></td>
> 					</tr>
> 					<tr>
> 						<th class="th1"><label id="accountNameLabel">管理者ID</label>(*):</th>
> 						<td class="td1"><input type="text" id="accountName" class="ime-disabled"/></td>
> 					</tr>
> 					<tr>
> 						<th class="th2"><label id="passwordLabel">パスワード</label>(*):</th>
> 						<td class="td2"><input type="password" id="password" class="ime-disabled"/></td>
> 					</tr>
> 					<tr><td colspan="2">&nbsp;</td></tr>
> 					<tr>
> 						<td colspan="2">
> 							<input type="submit" id="doOnceLogin" value="Login" te:renderJs="true"/>
> 						</td>
> 					</tr>
> 					</tbody>
> 					</table>
> 					
> 				</form>
> 			</div>
> 		</div>
> 		<div id="secondary">
> 			<br/>
> 		</div>
> 	</div>
> 
> 	<!-- footer Start -->
> 	<div id="footer">
> 	<p class="CopyRight">Copyright &copy; 2007 GrandTech Co,.Ltd All Rights Reserved.</p>
> 	</div>
> 	<!-- footer End -->
> </div>
> 	
> </body>
> </html>
> 
> package bookrental.web.admin;
> 
> import javax.faces.application.FacesMessage;
> import javax.faces.internal.FacesMessageUtil;
> 
> import org.seasar.teeda.extension.annotation.validator.Required;
> 
> import bookrental.dao.AccountMasterDao;
> import bookrental.dto.AccountDto;
> import bookrental.entity.AccountMaster;
> 
> public class AdminLoginPage extends AbstractAdminPage {
> 
> 	private String accountName;
> 
> 	private String password;
> 
> 	private AccountMasterDao accountMasterDao;
> 
> 	private AccountDto accountDto;
> 
> 	public String getAccountName() {
> 		return accountName;
> 	}
> 
> 	@Required
> 	public void setAccountName(String accountName) {
> 		this.accountName = accountName;
> 	}
> 
> 	public String getPageTitle() {
> 		return "ログイン";
> 	}
> 
> 	public String getPassword() {
> 		return password;
> 	}
> 
> 	@Required
> 	public void setPassword(String password) {
> 		this.password = password;
> 	}
> 
> 	public Class doOnceLogin() {
> 		AccountMaster accountMaster = accountMasterDao
> 				.selectByAccountName(accountName);
> 
> 		if (accountMaster == null) {
> 			FacesMessage fm = FacesMessageUtil.getMessage(this
> 					.getFacesContext(), "auth.notFoundAccount", null);
> 			fm.setSeverity(FacesMessage.SEVERITY_ERROR);
> 			this.getFacesContext().addMessage(null, fm);
> 			return null;
> 		}
> 
> 		if (!"A".equals(accountMaster.getAccountType())) {
> 			FacesMessage fm = FacesMessageUtil.getMessage(this
> 					.getFacesContext(), "auth.invalidAccountType", null);
> 			fm.setSeverity(FacesMessage.SEVERITY_ERROR);
> 			this.getFacesContext().addMessage(null, fm);
> 			return null;
> 		}
> 
> 		if (!password.equals(accountMaster.getPassword())) {
> 			FacesMessage fm = FacesMessageUtil.getMessage(this
> 					.getFacesContext(), "auth.invalidPassword", null);
> 			fm.setSeverity(FacesMessage.SEVERITY_ERROR);
> 			this.getFacesContext().addMessage(null, fm);
> 			return null;
> 		}
> 
> 		accountDto.setAuthed(true);
> 		accountDto.setAccountId(accountMaster.getAccountId());
> 		accountDto.setAccountName(accountMaster.getAccountName());
> 		accountDto.setAccountType(accountMaster.getAccountType());
> 
> 		return AccountMasterListPage.class;
> 	}
> 
> 	public Class initialize() {
> 		return null;
> 	}
> 
> 	public Class prerender() {
> 		return null;
> 	}
> 
> 	public void setAccountMasterDao(AccountMasterDao accountMasterDao) {
> 		this.accountMasterDao = accountMasterDao;
> 	}
> 
> 	public AccountDto getAccountDto() {
> 		return accountDto;
> 	}
> 
> 	public void setAccountDto(AccountDto accountDto) {
> 		this.accountDto = accountDto;
> 	}
> 
> }
> 
> 
> ───────────────────────────────
>  株式会社 グランテック
>  代表取締役社長
>  加藤 潤一 Junichi Kato
> 
> 〒154-0012
> 東京都世田谷区駒沢2-16-1 サンドー駒沢ビル4F
> TEL 050-5538-2383  FAX 03-3487-7211
> HP : http://www.grandtech.jp/
> BLOG : http://d.hatena.ne.jp/j5ik2o/
> E-MAIL : [E-MAIL ADDRESS DELETED]
> 
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user

───────────────────────────────
 株式会社 グランテック
 代表取締役社長
 加藤 潤一 Junichi Kato

〒154-0012
東京都世田谷区駒沢2-16-1 サンドー駒沢ビル4F
TEL 050-5538-2383  FAX 03-3487-7211
HP : http://www.grandtech.jp/
BLOG : http://d.hatena.ne.jp/j5ik2o/
E-MAIL : [E-MAIL ADDRESS DELETED]




Seasar-user メーリングリストの案内