java html render_关于render(“*.html”)报错的请教

在访问MyAdmin/user/ 时,调用index,返回一个login.html, 返回代码是:render("login.html");

在访问MyAdmin/prd/ 时,调用index,返回一个prd-list.html, 返回代码是:render("prd-list.html"),这个时候就报错,报错如下:JFinal-3.4 action report -------- 2018-08-26 22:39:42 --------------------------

Url         : GET /prd/

Controller  : com.dmm.admin.common.controller.PrdController.(PrdController.java:1)

Method      : index

Interceptor : com.jfinal.ext.interceptor.SessionInViewInterceptor.(SessionInViewInterceptor.java:1)

--------------------------------------------------------------------------------

2018-08-26 22:39:42

[ERROR]-[Thread: "http-bio-8080"-exec-6]-[com.jfinal.core.ActionHandler.handle()]: /prd/

com.jfinal.template.stat.ParseException: Syntax error: can not match end

Template: "/view/prd-list.html". Line: 113

at com.jfinal.template.stat.Parser.parse(Parser.java:93)

at com.jfinal.template.Engine.buildTemplateBySourceFactory(Engine.java:158)

at com.jfinal.template.Engine.getTemplate(Engine.java:139)

at com.jfinal.render.TemplateRender.render(TemplateRender.java:61)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:103)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)

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

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

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)

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

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

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)

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

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

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)

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

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

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

2018-08-26 22:39:42

[ERROR]-[Thread: "http-bio-8080"-exec-6]-[com.jfinal.core.JFinalFilter.doFilter()]: /prd/

java.lang.IllegalStateException: getOutputStream() has already been called for this response

at org.apache.catalina.connector.Response.getWriter(Response.java:636)

at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:205)

at com.jfinal.render.ErrorRender.render(ErrorRender.java:59)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:141)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)

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

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

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)

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

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

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)

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

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

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)

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

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

at java.lang.Thread.run(Thread.java:744)如果在2中换成render("login.html");则是可以的

这个是什么原因呢?各位大神请赐教

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值