2018-09-10 09:39
@JFinal uploadPath这个参数呢,我只是想单独限制某个方法中上传文件的大小,路径还是使用默认的。
2018-08-21 12:09
@JFinal
JspRender.class抛空指针异常,
public void render() {
try {
if(isSupportActiveRecord) {
this.supportActiveRecord(this.request);
}
this.request.getRequestDispatcher(this.view).forward(this.request, this.response);
} catch (Exception var2) {
throw new RenderException(var2);
}
}
还有插件里MailPro.class动态代理生成的request,response都是null,大神有点什么提示么,
public void send(String to, List cc, String subject, String viewPath, Map dataMap, List attachments) {
HttpServletResponse response = (HttpServletResponse)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{HttpServletResponse.class}, new MockHttpServletResponse());
HttpServletRequest request = (HttpServletRequest)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{HttpServletRequest.class}, new MockHttpServletRequest());
Iterator text = dataMap.entrySet().iterator();
while(text.hasNext()) {
Entry e = (Entry)text.next();
request.setAttribute((String)e.getKey(), e.getValue());
}
RenderManager.me().getRenderFactory().getRender(viewPath).setContext(request, response).render();
try {
String text1 = response.getWriter().toString();
this.send(to, cc, subject, text1, attachments);
} catch (IOException var11) {
throw new MailSendException("邮件发送失败!", var11);
}
}