2018-07-16 10:52

#for循环只能在页面加载时运行一次
之后的下拉获取新数据是通过jq添加到页面的,跟#for一毛钱关系也没有

如果你确定数据确实获取到了,试试这样:
$('....').append($('新数据'));

2018-07-16 10:43

影响在线(或者并发)访问人数的因素太多了,jf并不能决定一切
比如tomcat配置的线程池;比如服务器核心数、内存、带宽;比如是否正确启用了缓存,比如页面字节数等等

2018-07-12 10:15

为你的项目写一个BaseService是必须的
可以写成抽象类,提供常用的上下文操作、ORM操作
然后各业务Service全部继承这个BaseService,同时实现单列
Controller中直接引用这个单列的Service即可

再高级一点,利用guice实现业务Service的注入

再再高级一点,为每个Model自动生成对应的Service

2018-07-05 15:34

波总说了,没时间,你可以利用搜索引擎的 site:www.jfinal.com keyword...

2018-07-03 15:35

@JFinal 把session放进db,频繁读写的话不太放心

2018-07-03 14:56

@JFinal 试了很多次还是不行,最后没办法,用cookie写了另一种session实现,仅供开发模式时使用

2018-07-03 10:42

换成JFinalDemo,停止服务时也会报同样的错误:
--------------------------------------------------------
03-Jul-2018 10:40:03.544 信息 [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
03-Jul-2018 10:40:03.607 信息 [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
03-Jul-2018 10:40:03.669 信息 [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
03-Jul-2018 10:40:03.684 警告 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
03-Jul-2018 10:40:03.684 警告 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
03-Jul-2018 10:40:03.700 警告 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
03-Jul-2018 10:40:03.700 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@15900742]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@19353706]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 10:40:03.700 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@15900742]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@69ddc37b]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 10:40:03.700 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@15900742]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@30a252ae]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 10:40:03.700 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@15900742]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@259df9ef]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 10:40:03.700 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@15900742]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@12e1b889]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 10:40:03.700 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@15900742]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@3074af59]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 10:40:03.700 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@15900742]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@7aec6a39]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 10:40:03.700 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@15900742]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@6c60e0a6]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 10:40:03.700 信息 [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
03-Jul-2018 10:40:03.700 信息 [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]

@JFinal

2018-07-03 09:45

@王小帅的vivo-x 如果视图文件名称与actionKey相同,就不用显示的调用render

2018-07-03 09:33

@JFinal 很遗憾啊波总
我试了8.5.23、8.5.32(当前8.5.X最新)
又试了8.0.X的最后一个stable版本:8.0.52,全部都提示异常:

03-Jul-2018 09:29:24.761 警告 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
03-Jul-2018 09:29:24.761 警告 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
03-Jul-2018 09:29:24.761 警告 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [CaptchaCache] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Unknown Source)
java.util.TimerThread.run(Unknown Source)
03-Jul-2018 09:29:24.761 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$2] (value [com.jfinal.template.io.WriterBuffer$2@2ba20fd]) and a value of type [com.jfinal.template.io.CharWriter] (value [com.jfinal.template.io.CharWriter@75b2024b]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 09:29:24.761 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$3] (value [com.jfinal.template.io.WriterBuffer$3@50a57129]) and a value of type [com.jfinal.template.io.FastStringWriter] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 09:29:24.761 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$1] (value [com.jfinal.template.io.WriterBuffer$1@5bc132e]) and a value of type [com.jfinal.template.io.ByteWriter] (value [com.jfinal.template.io.ByteWriter@56d276ac]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 09:29:24.761 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$2] (value [com.jfinal.template.io.WriterBuffer$2@2ba20fd]) and a value of type [com.jfinal.template.io.CharWriter] (value [com.jfinal.template.io.CharWriter@48c09515]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 09:29:24.761 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$3] (value [com.jfinal.template.io.WriterBuffer$3@50a57129]) and a value of type [com.jfinal.template.io.FastStringWriter] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 09:29:24.761 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$2] (value [com.jfinal.template.io.WriterBuffer$2@2ba20fd]) and a value of type [com.jfinal.template.io.CharWriter] (value [com.jfinal.template.io.CharWriter@6822ae4a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
03-Jul-2018 09:29:24.761 严重 [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [com.jfinal.template.io.WriterBuffer$3] (value [com.jfinal.template.io.WriterBuffer$3@50a57129]) and a value of type [com.jfinal.template.io.FastStringWriter] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

2018-07-03 08:51

现在是8.5.23,最新的是8.5.32,有差别吗

2018-07-03 08:46

如果实在没有东西render,那就renderNull()

2018-07-03 08:45

每个action都需要render...,除非抛出异常
如果你没有显示的调用render...,那么JFinal会自动调用render(actionKey)