[Seasar-user:12743] [SAStruts/MAYAA] 連携の方法をご教授願えないでしょうか?
[E-MAIL ADDRESS DELETED]
[E-MAIL ADDRESS DELETED]
2008年 2月 5日 (火) 11:53:56 JST
いつもお世話になっております。
tiger8810marと申します。
現在、SAStrutsとMAYAAとの連携検証を行っているのですが上手くいかなくて困っています。
以下、検証の手順です。
1.sastrtusのサンプルプロジェクトとmayaa導入war内のlibをマージ
web.xmlもマージ
2.mayaaサンプルプログラム「usebean」をコピーして動作確認。
⇒期待通りMybeanの初期値が画面に表示される。
package tutorial.action;
import org.seasar.struts.annotation.Execute;
public class MayaaTestAction {
@Execute(validator = false)
public String index() {
return "usebean.html";
}
}
3.usebean.mayaaファイルの<m:beforeRender>〜<m:beforeRender/>を削除して
Actionクラス内でbeanを生成するように変更
package tutorial.action;
import org.seasar.struts.annotation.Execute;
import example.MyBean;
public class MayaaTestAction {
@Execute(validator = false)
public String index() {
MyBean bean=new MyBean();
return "usebean.html";
}
}
2と同じ結果が表示されることを期待していたのですが
エラーとなってしまいます。
DEBUG 2008-02-05 11:44:53,644 [http-8080-1] /mayaaTest/usebean.mayaa build start.
DEBUG 2008-02-05 11:44:53,659 [http-8080-1] /mayaaTest/usebean.html build start.
DEBUG 2008-02-05 11:44:53,659 [http-8080-1] built node tree from template. /mayaaTest/usebean.html
DEBUG 2008-02-05 11:44:53,753 [http-8080-1] built processor tree from node tree.
/mayaaTest/usebean.html
INFO 2008-02-05 11:44:53,800 [http-8080-1] error template not found,
/org.seasar.mayaa.impl.cycle.script.rhino.OffsetLineRhinoException
INFO 2008-02-05 11:44:53,800 [http-8080-1] error template not found,
/org.mozilla.javascript.EvaluatorException
INFO 2008-02-05 11:44:53,800 [http-8080-1] error template not found,
/org.mozilla.javascript.RhinoException
INFO 2008-02-05 11:44:53,815 [http-8080-1] error template not found, /java.lang.RuntimeException
INFO 2008-02-05 11:44:53,831 [http-8080-1] error template not found, /java.lang.Exception
DEBUG 2008-02-05 11:44:53,831 [http-8080-1] /java.lang.Throwable.html build start.
DEBUG 2008-02-05 11:44:53,847 [http-8080-1] built node tree from template. /java.lang.Throwable.html
DEBUG 2008-02-05 11:44:54,112 [http-8080-1] built processor tree from node tree.
/java.lang.Throwable.html
ERROR 2008-02-05 11:44:54,347 [http-8080-1] handled exception, TypeError: Cannot read property "id"
from undefined in script=
bean.id (/mayaaTest/usebean.mayaa#write#5)
org.seasar.mayaa.impl.cycle.script.rhino.OffsetLineRhinoException: TypeError: Cannot read property
"id" from undefined in script=
bean.id (/mayaaTest/usebean.mayaa#write#5)
at
org.seasar.mayaa.impl.cycle.script.rhino.TextCompiledScriptImpl.execute(TextCompiledScriptImpl.java:210)
at org.seasar.mayaa.impl.engine.processor.WriteProcessor.writeValue(WriteProcessor.java:126)
at org.seasar.mayaa.impl.engine.processor.WriteProcessor.writeStartElement(WriteProcessor.java:178)
at
org.seasar.mayaa.impl.engine.processor.AbstractAttributableProcessor.processStart(AbstractAttributableProcessor.java:184)
at
org.seasar.mayaa.impl.engine.processor.AbstractAttributableProcessor.doStartProcess(AbstractAttributableProcessor.java:168)
at org.seasar.mayaa.impl.engine.RenderUtil.renderTemplateProcessor(RenderUtil.java:134)
at org.seasar.mayaa.impl.engine.RenderUtil.renderProcessorTree(RenderUtil.java:232)
at org.seasar.mayaa.impl.engine.TemplateImpl.doTemplateRender(TemplateImpl.java:203)
at org.seasar.mayaa.impl.engine.PageImpl.renderTemplate(PageImpl.java:242)
at org.seasar.mayaa.impl.engine.RenderUtil.renderPage(RenderUtil.java:317)
at org.seasar.mayaa.impl.engine.PageImpl.doPageRender(PageImpl.java:190)
at org.seasar.mayaa.impl.engine.EngineImpl.doPageService(EngineImpl.java:368)
at org.seasar.mayaa.impl.engine.EngineImpl.doService(EngineImpl.java:490)
at org.seasar.mayaa.impl.MayaaServlet.doService(MayaaServlet.java:97)
at org.seasar.mayaa.impl.MayaaServlet.doGet(MayaaServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.seasar.struts.filter.RoutingFilter.forward(RoutingFilter.java:160)
at org.seasar.struts.filter.RoutingFilter.doFilter(RoutingFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.seasar.framework.container.hotdeploy.HotdeployFilter.doFilter(HotdeployFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.seasar.framework.container.filter.S2ContainerFilter.doFilter(S2ContainerFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.seasar.extension.filter.EncodingFilter.doFilter(EncodingFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
何か設定もしくはコードの記述誤りがあるのでしょうか?
ご教授お願いできますでしょうか?
また、もし可能でしたらMAYAAとSAStrutsとの連携サンプルもどちらかのプロジェクトにあると
助かります。
SAStrtusのビューをMAYAAでというニーズはあるのではないでしょうか?
以上、よろしくお願いします。
Seasar-user メーリングリストの案内