修改ueditor.config.js
//项目名称/ueditor存放的目录 当前项目Test ueditor目录 WebRoot/plugins/ueditor
window.UEDITOR_HOME_URL = "/Test/plugins/ueditor";
var URL = window.UEDITOR_HOME_URL || getUEBasePath();
window.UEDITOR_CONFIG = {
//为编辑器实例添加一个路径,这个不能被注释
UEDITOR_HOME_URL: URL
// 服务器统一请求接口路径
, serverUrl: URL + "jsp/controller.jsp"
修改ueditor/jsp/config.json
/* 上传图片配置项 */
"imageUrlPrefix": "/Test", /* 图片访问路径前缀 */
"imagePathFormat": "/ueditor/image/{yyyy}{mm}{dd}/{time}{rand:6}",
/* 列出指定目录下的图片 */
"imageManagerListPath": "/ueditor/image/", /* 指定要列出图片的目录 */
"imageManagerUrlPrefix": "/Test", /* 图片访问路径前缀 */
修改com.baidu.ueditor.hunter.FileManager后打成jar包放入项目中
private String getPath ( File file ) {
String path = file.getAbsolutePath();
//path.replace( this.rootPath, "/" );
return path.replace(this.rootPath.replaceAll("\\/", "\\\\"), "\\" ); }