2016-11-08 12:09
@JFinal 我把PathKit.class.getResource("/")改为PathKit.class.getResource("/").getClass().getResource("/")就能显示路径了,不过jetty加载servlet又出错了,导出的jar包里面也没有web项目的页面和web.xml。。。
2016-11-08 11:29
@JFinal PathKit.class.getResource("/")这里获取到的是rscr:好像是系统资源信息什么东东,所有它转化为ui的时候报错了
2016-11-01 10:42
@JFinal 2.2版本的,该路径参数接受以”/”打头或者以 windows 磁盘盘符打头的绝对路径,这句话我把“或者“后面理解单独的一部分了。
2016-10-20 13:48
@JFinal 把tinyblob改成blob才能写进去,我下载的图标156字节,就是写不进去,非要改成blob
2016-09-23 16:23
@JFinal 恩,老大这么一说就更明白了,后来我也是想到了拦截器,
Client c = ai.getController().getSessionAttr("client");
if (c == null) {
c = new Client();
System.out.println("rebuilded!");
ai.getController().setSessionAttr("client", c);
}
2016-09-22 16:49
我尝试了一下,是有出现报错:
[ERROR]-[Thread: http-bio-8080-exec-5]-[com.jfinal.core.ActionHandler.handle()]: /SocketClient/findReader?reader=123&passwd=
java.lang.NullPointerException
at com.jfinal.core.Controller.setSessionAttr(Controller.java:330)
at SocketClient.ClientController.(ClientController.java:11)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:68)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)