This one is really funny. Tweak as much as you want, it remains PHP Think about it.
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
connector.userFilesPath=/opt/hosting/userfiles
What should my custom UserPathBuilder return? All or part of the path?
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.
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.
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.
davewebb wrote: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.
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 .
I have made a lot of progress. In my development env, I am using my Custom UserPathBuilder to return both the absolute path to save the files to on the OS, and the Context relative path to return and stick in the FCKEditor control. Everything works perfectly in dev.
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.
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
Would be nice to have it like
var _FileBrowserLanguage = 'java' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'java' ; // asp | aspx | cfm | lasso | perl | php | py
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
<servlet-mapping>
<servlet-name>Connector</servlet-name>
<!-- Do not wrap this line otherwise Glassfish will fail to load this file -->
<url-pattern>/js/fckeditor/editor/filemanager/connectors/*.fckj</url-pattern>
</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.
I made this change in the fckconfig.js and tricked apache into not trying to interpret a PHP call and the connector successfully passed through mod_jk and is being handled by the ConnectorServlet.
var _FileBrowserLanguage = 'fckj' ;
var _QuickUploadLanguage = 'fckj' ;
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
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?
Well, the docs for the net.fckeditor.connector.* package are not complete yet. Others are already. Only package.htmls and the "big picture" with a diagram is missing. The code is actually ready to roll.
If you hav any improvement ideas, please file a ticket or tell me. Did you already try the LocaleResolver?
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.
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
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
Re: Upload Absolute Path with Custom UserPathBuilder Impl
Mike,
I have the following fckeditor.properties:
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.