集成springmvc,当第一次访问页面是会出错,第二次及以后就不会,求解。
配置:
<bean id="beetlConfig" class="org.beetl.ext.spring.BeetlGroupUtilConfiguration"
init-method="init" />
<bean id="viewResolver" class="org.beetl.ext.spring.BeetlSpringViewResolver">
<property name="contentType" value="text/html;charset=UTF-8"></property>
<property name="prefix" value="/WEB-INF/template/"></property>
<property name="suffix" value=".html"></property>
</bean>
版本:beetl 2.0.10
出错:
[ERROR] Nested in org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.RuntimeException: java.lang.RuntimeException: ATTRIBUTE_NOT_FOUND:
java.lang.RuntimeException: java.lang.RuntimeException: ATTRIBUTE_NOT_FOUND
at org.beetl.core.engine.StatementParser.exec(StatementParser.java:176)
at org.beetl.core.engine.StatementParser.parse(StatementParser.java:45)
at org.beetl.core.engine.BasicProgramOptProbe.check(BasicProgramOptProbe.java:50)
at org.beetl.core.engine.TypeBindingProbe.check(TypeBindingProbe.java:138)
at org.beetl.core.engine.FastRuntimeEngine$FilterProgram.execute(FastRuntimeEngine.java:42)
at org.beetl.core.Template.renderTo(Template.java:121)
at org.beetl.core.Template.renderTo(Template.java:87)
at org.beetl.ext.web.WebRender.render(WebRender.java:74)
at org.beetl.ext.spring.BeetlSpringView.renderMergedTemplateModel(BeetlSpringView.java:41)
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.RuntimeException: ATTRIBUTE_NOT_FOUND
at org.beetl.core.engine.StatementParser.exec(StatementParser.java:176)
at org.beetl.core.engine.StatementParser.exec(StatementParser.java:130)
... 40 more
Caused by: ATTRIBUTE_NOT_FOUND
at org.beetl.core.om.AttributeAccessFactory.buildFiledAccessor(AttributeAccessFactory.java:157)
at org.beetl.core.engine.VarAttributeNodeListener.onEvent(VarAttributeNodeListener.java:49)
at org.beetl.core.engine.StatementParser.exec(StatementParser.java:143)
... 41 more
[ERROR] /p/1.html
java.lang.RuntimeException: java.lang.RuntimeException: ATTRIBUTE_NOT_FOUND
at org.beetl.core.engine.StatementParser.exec(StatementParser.java:176)
at org.beetl.core.engine.StatementParser.parse(StatementParser.java:45)
at org.beetl.core.engine.BasicProgramOptProbe.check(BasicProgramOptProbe.java:50)
at org.beetl.core.engine.TypeBindingProbe.check(TypeBindingProbe.java:138)
at org.beetl.core.engine.FastRuntimeEngine$FilterProgram.execute(FastRuntimeEngine.java:42)
at org.beetl.core.Template.renderTo(Template.java:121)
at org.beetl.core.Template.renderTo(Template.java:87)
at org.beetl.ext.web.WebRender.render(WebRender.java:74)
at org.beetl.ext.spring.BeetlSpringView.renderMergedTemplateModel(BeetlSpringView.java:41)
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.lang.RuntimeException: ATTRIBUTE_NOT_FOUND
at org.beetl.core.engine.StatementParser.exec(StatementParser.java:176)
at org.beetl.core.engine.StatementParser.exec(StatementParser.java:130)
... 40 more
Caused by: ATTRIBUTE_NOT_FOUND
at org.beetl.core.om.AttributeAccessFactory.buildFiledAccessor(AttributeAccessFactory.java:157)
at org.beetl.core.engine.VarAttributeNodeListener.onEvent(VarAttributeNodeListener.java:49)
at org.beetl.core.engine.StatementParser.exec(StatementParser.java:143)
... 41 more
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
用最新版本2.1.0