My current environment is
JBoss 4.2.3 FCKEditor 2.6.4 java-core 2.4.1
I have the Connector Servlet configured correctly and files are uploading no problem.
Here is my delimma...
I have created a custom Impl for the UserPathBuilder Interface so that my users have their own sandboxes of images, etc. My custom class returns "/opt/hosting/userfiles/<userID>". I can return all or part of that path, as needed, to achieve my goal here.
My goal is to have the files saved in the real operating system absolute path of /opt/hosting/userfiles/<userID>, but the files are saving in the /opt/jboss/server/default/tmp/deploy/<MyEAR>/<MyWAR>/opt/hosting/userfiles/<userID> directory, which changes everytime there is a deployment.
How can I force FCKEDitor to save to the absolute path returned by my customer UserPathBuilder Impl? Or, a combination of a preset absolute path root (like /opt/hosting/userfiles), plus my userID (like /2, /145, etc) for an overall final value of /opt/hosting/userfiles/<userID?
Secondly, I have an apache Virtual directory /userfiles that points to /opt/hosting/userfiles.
When the image is saved, it is being referenced in the HTML like
<img src="/ATS/opt/hosting/userfiles/2/image/myImage.gif" />
where "/ATS" is the context-Root of my WAR and is not desired, but I would like it to be
http://www.mydomain.com/userfiles/2/image/myImage.gif
Any help is appreciated. I have been working on various changes in the config.php over the past few hours and I am at the end of my rope . TIA.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Your dilemma can't be solved with FCKeditor.Java 2.4.1. Please use 2.5-SNAPSHOT from SVN.
This one is really funny. Tweak as much as you want, it remains PHP
Think about it.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Hence my post, I wasnt sure how the upload was taking place, but trying anything I could.
So, fair enough, and I will get and build the 2.5 snapshot. Once I do that, where _is_ the correct place for configuring the absolute file path for uploads?
I have this in fckeditor.properties
What should my custom UserPathBuilder return? All or part of the path?
Thanks!
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Everything at http://java.fckeditor.net references 2.4.1. Where is the 2.5 documentation?
I am browsing the SVN repository now and there are no tags or branches denoting version 2.5 SNAPSHOT? Is 2.5 the trunk?
Thank you.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
How can it be? 2.5 is SNAPSHOT and thus not final. Non-final code is either a trunk or branch, never a tag. The repo is selfcontained. Everything is in the trunk. You should always check the parent pom.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Consider for a moment that no one else uses tagging and branching like you do. Not that either is wrong or right, but only different.
I have only one question at this time...
Where is the 2.5 documentation?
Thanks.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Well that's not correct. Everyone does who uses the maven release plugin. Are you familiar with Maven 2 at all (this one is really essential)? The docs are in the trunk.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
I am very familiar with Maven2. I dont disagree that other people use SVN like you do. At my shop, we have mutiple releases developed in parallel to one another. Since you cant develop 2 new releases simulaneously in trunk, we create 2 branches for the new development, and then merge them back together when they are all completed. MAny large enterprise shops do it this way. Like I said before, only different ways of accomplishing the same goal of managing and releasing quality software.

Ill go read those docs and thanks again for the assistance. I dont envy you having to answer all these questions on the support, but some of us asking do know our head from our ass.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
This is exactly how I develop at work and here: spin off (branch), develop, merge back. Unfortunately my last branch diff was about 49 000 lines. My colleagues didn't know the notion of working in a branch.
Ok, since you are familiar with M2, you know that everything goes to site and javadocs. I have made (imho) a well designed site structure. Easy to grasp.

Please give me feedback on the code.
Thanks,
Mike
PS: To make life easier, evaluate LocalConnector (just a tip
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Mike,
I have the following fckeditor.properties:
My files are now saved in the absolute server path as denoted in this log entry:
Where 2 is the userID...Good!
The saved file is "/opt/hosting/brightmove/userfiles/2/image/database.png"..Good!
The link to the image in FCKEditor is "/image/database.png"...Bad
I feel like we are almost there, but I am missing something stupid, and when I click on Configuration Reference from the generated site, "properties.html" is not available, so my solution might lie within that if you could point me to the availalbe config properties for 2.5.
What I need to complete what I am trying to do is have the link to the image in FCKEditor be
Can you help out with this? Thanks again!
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Every minor and/or major release may add or remove capabilities. Deducing from you post, I assume that you haven't read the generated site completely. You should always read the Upgrade Notes
.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
My last remaining issue is involving deploying this to my QA environment which is clustered and the JBoss instances sit behind the Apache Mod_jk load balancer. The "connector.php" in the request is messing up something when apache parses the URL And decides to send it to JBoss or keep it within apache's scope.
IMHO, it would be nice to have a "Java" option in the fckconfig.js, rather than having is set to PHP and assuming there is nothing between the browser and the Servlet Container that might filter the request.
Would be nice to have it like
Then figure out an extention that would correlate to the servlet mapping, say 'fckj'.
Then you could have something like this in the servlet mapping
This way you could get all PHP referneces out since it is an all java solution. What do you think? I might be forced to help implement if I cant figure out how to make the load balancer send the request on to JBoss.
Also, the 2.5 docs are good. I will try to send some examples of how the UserPathBuilder is overridden and how the return values translate to what operations take place when a file is uploaded or chosen.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Thanks for the assistance.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Well,


the default url mapping goes to .../connectors/*. What ever happends with httpd is out of our scope. Tomcat intercepts those calls if it is used solely. Since httpd tries to interprete this call instead of passing it to JBoss it's clearly a client/httpd problem. It's up to you to change the default connector path to any path you like. Since we provide only generic implementation, your issue is too special to be treated, imho. You can retain the connector url and change the file browser language to "fake" or whatever you want. The servlet doesn't care
I guess your solution is up and running with only a few lines of code
Btw, did you check the LocalConnector's JavaDoc? It depits your virtual dir case in httpd: http://dev.fckeditor.net/browser/FCKedi ... r.java#L28
The configs of the current file browser are somewhat cumbersome.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
I agree that having a httpd server that interprets PHP, and optionally passes other requests on to a Java Web Container is not common. Hopefully someone else reads this thread and saves some time.
I did read the LocalConnector javadoc and it clearly explained using it to save files to the filesystem. I think using it in conjunction with a UserPathBuilderImpl was not crystal clear, but I figured it out so it must have been clear enough, right?
Thanks again.
Re: Upload Absolute Path with Custom UserPathBuilder Impl
If you hav any improvement ideas, please file a ticket or tell me. Did you already try the LocaleResolver?
You are welcome.