freemarker 异常:Cannot expose request attribute 'request' because of an existing

使用freemarker模板技术的项目,访问服务器异常

javax.servlet.ServletException: Cannot expose request attribute 'request' because of an existing model object of the same name

at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:123)

at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)

at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)

at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)

at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)

at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:468)

at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)

at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)

at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:445)

at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:304)

at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:399)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:179)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:745)

我出现这个问题的原因是,freemarker配置文件宏定义页面,出现了一个小小的空格,造成整个系统的崩溃.让人很不爽啊.

你可能感兴趣的:(异常)