I am using the fckeditor-java-demo-2.4.1 with the version of FCKEditor supplied in its download. I have made the following changes to this configuration:
- Added the following line to the fckeditor.properties file: connector.userPathBuilderImpl=com.hoylesoft.server.MyUserFilesPath;
- Created MyUserFilesPath.java, compiled it, and placed it in WEB-INF/classes where it is found and executed when I click Browse Server in the Insert Images dialog. (MyUserFilesPath.java was created per specifications implementing the UserPathBuilder interface.)
- I get the same results in Firefix and Opera.
The above works with the samples just fine. My problem is that I need to pass a user ID string to MyUserFilesPath so that it can return a user-specific file path for images. Another post (viewtopic.php?f=6&t=11290&hilit=+rewrite#p29755) suggests using FCK:config tags for the ImageBrowserURL to add a query string to pass my user ID string. I have not gotten this technique to work.
This is how I am calling the editor via JSP, while preparing to pass my user ID string:
String browserUrl = "/fckeditor/editor/filemanager/browser/default/browser.html"; String connectorUrl = "/fckeditor/editor/filemanager/connectors/php/connector.php"; ....... <FCK:editor instanceName="EditorDefault" height="400px"> <jsp:attribute name="value"> some text to edit. </jsp:attribute> <jsp:body> <FCK:config ImageBrowserURL="${browserUrl}?Type=Image&Connector=${connectorUrl}" /> <FCK:config FlashBrowserURL="${browserUrl}?Type=Flash&Connector=${connectorUrl}" /> </jsp:body> </FCK:editor>
Re: Java connector.userPathBuilderImpl Problems
you are looking for viewtopic.php?f=6&t=13887
Re: Java connector.userPathBuilderImpl Problems
mosipov,
Thanks for your reply. Yes, you supplied the link back to the post where you helped someone else with this same problem. The link in my post pointed to my http:// localhost:8080, where I was testing solutions to my problem.
I will try once again to follow the above mentioned post to see if I can actually get it to work.
Danny
Re: Java connector.userPathBuilderImpl Problems
I believe you mentioned, in some other post, that the Java session may be a possibility for passing parameters. Not really liking where all of my previous endevours were heading, I decided to research this a bit further, and I think it will work.
The Java session ID seems to be preserved across the several JSP pages I use to invoke the FCKeditor, as well as the servlet that eventually calls my getUserFilesPath method. I tried setting the attribute in the session I wanted to pass to getUserFilesPath, and it worked! (Sorry about my exclamation, but I am not really a Java expert and even less a JSP one.)
What do you think? If this works, it is almost independent of FCKEditor, especially the URLs used to invoke its inner processes.
Thanks,
Danny
Re: Java connector.userPathBuilderImpl Problems
if you look at the interface, you see that I pass the current request. Which means that you are able to access the request and the session. The only reason you need to alter the browserurl is to pass additional params through the request. If you rely on the session, you may preset the session and use it as you desire.
So going with the session is a valid solution. That's what I do.
Re: Java connector.userPathBuilderImpl Problems
Michael,
Thanks again for your help.
For anyone who needs a bit more information, here is the relevant Java code in my JSP that calls FCKEditor:
Re: Java connector.userPathBuilderImpl Problems
yes this is a valid solution.
Mike
Re: Java connector.userPathBuilderImpl Problems
Hi Michael,
I have try your suggestion but the browser return a message "The server didn't reply with a proper XML data. Please check your configuration"
My Java code is as below. For testing purpose, I hard-code the path to /userfiles/memberid as below
Re: Java connector.userPathBuilderImpl Problems