Hi,
I'm very interested in using version fckeditor java 2.5; it's supposed to support writing user files to arbitrary folders, not necessarily in the context path.
Is 2.5 being developed in the svn trunk? It seems that this functionality is already implemented. Is this already tested/ ready for use? (In would only need to interact with the file system, no other fancy stuff). Is there some configuration guide available?
Best regards,
Bo
I'm very interested in using version fckeditor java 2.5; it's supposed to support writing user files to arbitrary folders, not necessarily in the context path.
Is 2.5 being developed in the svn trunk? It seems that this functionality is already implemented. Is this already tested/ ready for use? (In would only need to interact with the file system, no other fancy stuff). Is there some configuration guide available?
Best regards,
Bo
Re: version 2.5 java
Hi Bo,
Re: version 2.5 java
What I don't have quit clear yet is how to configure it the right way. It seems to me that this new implementation (of the LocalConnector) needs an extra parameter.
My use case is the following: I'd like to save uploaded documents and images in a directory outside my tomcat context, say directory /var/files.
The files would be visible to the enduser by making a call to a servlet that serves back the requested file, say /servlet/content
So I should configure the connector to save the files at /var/files, but when a user selects a file to create a link to it in the editor, the connector should return /servlet/content/myfilename.
Could you shed a light on what is configured where?
thanks, Bo
Re: version 2.5 java
Yes, this can be done in few lines of code.
First of all you have to know that the Connector interface thightly goes along with the UserPathBuilder interface.
You have to use some specific implementations, the LocalConnector is a suitable implementation.
Now you need to set the paths:
connector.userFilesPath = /servlet/content
connector.userFilesAbsolutePath = /var/files
now here comes the tricky part, since you save outside of the context but want the context to server them thru a proxy servlet => mixed concerns.
Fortunately, LocalConnector and ContextPathBuilder will do this automagically.
ContextPathBuilder will mandate userfilespath to local connector but will automatically resolve userfilespath against your context.
Bottom line is, add this to your fckeditor.properties and give it a try:
userpathbuilderimpl will use default impl which is ContextPathBuilder.
Try and tell,
Mike
Re: version 2.5 java
2 more questions:
1. when I choose a file, the given path includes the context path, e.g. /mycontext/servlet/content.
Is it possible to have it return servlet/content? My pages have a base path, so that would work fine and is more flexible in case I have to change context..
2. Do you happen to include a proxy servlet? (I think I read something about that in your other post?)
Regards,
Bo
Re: version 2.5 java
Re: version 2.5 java
Re: version 2.5 java
Re: version 2.5 java
i have check out both java-core & java-demo project of latest version in my eclipse, i'd like to know how could i run these two
project together to see new functions which both of you discussed above.
could you show me step to run them? thanks a lot!
Best Regards,
kc
Re: version 2.5 java
Well, you should build it first and have the site and JavaDocs generated to see changes.
Invoke with maven:
Alternatively, you can invoke this with m2eclipse too, I presume that you have checked this project out as a maven project from SVN with m2eclipse. This is the smoothest way to go.
Now you have a zip and ja distros which contains the entire but incomplete site docs, JavaDocs and everything else. You can strart by reading them and check back here if you have made yourself comfortable with.
The main question is: is there something special you want to achieve or do you want to take a tour through the new code?
Mike
Re: version 2.5 java
I am looking at changing the "userFilesPath" dynamically based on the type of user. I plan to install the editor as a common application and each participating application (which req content editor) can use the common editor application to manipulate the content. I need a way to pass the "userFilesPath" dynamically for each participating application and this way its own related files are kept in one place.
Also I need a way to disable the "Create Folder" button in the upload screen. I don't want the end user to create folder on the server.
Thanks and appreciate your prompt response,
- Sudharsan.
Re: version 2.5 java
first of all have a look at the trunk site and the JavaDocs. It reveals most of the necessary docs.
You wish can be integrated very easily. I presume you have already chosen the ContextConnector (adapt the code below for any other Connector).
Re: version 2.5 java
Greatly appreciate your prompt reply. Regarding item 2, yes I do agree it is very easy. But on item 1, rather coding My own builder, is there a way I can pass the userpathfile as request parameter to FCKEditor invocation. The reason is, I plan to keep the FCKEditor as a standalone application and even if I push my logged in user session variable from the calling client application, it wouldn't be visible inside Java FCKEditor app. Also on the other hand I can create a custom class to retrieve parameter from req and build the path if there is a provision of passing the information thru URL request to FCKEditor from client application.
Thanks and as always appreciate your help,
- Sudharsan.
Re: version 2.5 java
I do not fully understand your intention. The editor requires a web server, I presume you run jetty in embedded mode. It should be a hassle to put it into the session. But if you really can't you have to go another way. You can read any request params in Java but they have to be passed. This means, you have to alter some source of the FCKeditor which is going to be very tedious. I would not recommend to go this way unless you have no other choice. This solution would be already out of scope of FCKeditor.Java but fine with the UserPathBuilder interface since it's up to you how you build the paths.
Mike