java版ckeditor和ckfinder已经整合完毕,能够正常使用,但是我现在想实现这样一个功能,每个用户登录网站后,编辑东西时只能看到自己上传的文件,等于说是baseurl可以根据用户动态更改,怎么实现啊??????????????

解决方案 »

  1.   

    动态的相对路径配置文件的写法connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
    connector.userPathBuilderImpl = cn.cpees.k_fmss.jyjj.service.FckeditorUserPath
    这里不用指定路径,指定我们要定义的生产路径的类即可。 FckeditorUserPath类的写法public class FckeditorUserPath  implements UserPathBuilder{
      public String getUserFilesAbsolutePath(HttpServletRequest request) {
       return "/app/11_fmss/jyjj/user_temp_files/"+request.getSession(false).getAttribute("username")+"/"+DateUtil.currentDate();
      }
      
      public String getUserFilesPath(HttpServletRequest request) {
       
       return "/app/11_fmss/jyjj/user_temp_files/"+request.getSession(false).getAttribute("username")+"/"+DateUtil.currentDate();
      }
     }
    这个类是生产路径的类。