com.jfinal.render.VelocityRender
static void init(ServletContext servletContext) {
String webPath = servletContext.getRealPath("/");
properties.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, webPath);
properties.setProperty(Velocity.ENCODING_DEFAULT, getEncoding());
properties.setProperty(Velocity.INPUT_ENCODING, getEncoding());
properties.setProperty(Velocity.OUTPUT_ENCODING, getEncoding());
}
此方法中,servletContext.getRealPath("/")为获取绝对路径,但weblogic中部署,该值的获取为空,会导致系统报错。