I'm current working with CkFinder on JSF 2.0 (don't mention about this because i bet that the issue did not came from JSF), running on GlassFish Server 3.1.
I want to use CkFinder to provide user's private folder (each user have their own folder - let assume that the folder existed when they upload file).
First, I read this Document: http://docs.cksource.com/CKFinder_2.x/Developers_Guide/Java/Configuration/Extending
As the document said, i wrote a PathBuilder for that...
@Override public String getBaseUrl(HttpServletRequest request) { String userFolder = request.getSession(true).getAttribute("userFolder").toString(); return "/personalUpload/" + userFolder + "/"; }
But each time i press the "Upload" Button (the button to upload image to server after selecting multi file to upload to server), it create a new Session, and as a result, the session changed, and userFolder turned into null. (i dont' know why it created a new session ?)
How can i solve this problem?
Thank in advance
Snap shot:
Server Log (I created a Filter to write out all Session's ID request to my server)
Before pressing upload button:
INFO: Session ID = "e54c5282b348300eaa98ef3014cf" Reqest : /Demo.Upload/ckfinder/core/connector/java/connector.java WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /Demo.Upload, because request parameters have already been read, or ServletRequest.getReader() has already been called
After pressing upload button...
INFO: Session ID = "e6b68691c72b4527717f4d5daad9" Reqest : /Demo.Upload/ckfinder/core/connector/java/connector.java WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /Demo.Upload, because request parameters have already been read, or ServletRequest.getReader() has already been called SEVERE: javax.servlet.ServletException: java.lang.NullPointerException
Re: CkFinder with Java with session issue?
Hi,
some users experiencing problem with flash upload. Please read http://cksource.com/forums/viewtopic.php?f=10&t=23616 and try other solutions.
Re: CkFinder with Java with session issue?
Could you try disabling flash plugin for CKFinder and see if it works then?
If not, please try to turn on debugging and see what errors you get -
http://docs.cksource.com/CKFinder_2.x/D ... leshooting - and post them.
I know that error messages are different but perhaps you could try using second solution from the above link, I meant the solution for "Flash Upload Problem".