I`m using the Java 2.5 connector for image uploading to the server and I`d like to write my files to a database rather then filesystem.
I`m using Spring in my project and I`d like to make the Connector a Spring bean so my DAO`s can be injected and Spring Transaction managers can be used.
Has anyone found a solution to this?
If not I`ll create a project probaly using the Spring HttpRequestHandler to enable Spring bean Connectors to be used and submit it for inclusion to the Java integration.
Having a connector that works with Spring would also be beneficial to those using Grails.
Does anyone else think this is a good idea?
Darran
Wed, 04/08/2009 - 11:18
#1
Re: FCKEditor 2.5 Spring Connector
Re: FCKEditor 2.5 Spring Connector
There`s a servlet in the project called FCKSpringConnectorServlet which derives from the ConnectorServlet and uses the WebApplication context to inject the bean into the dispatcher.
I had to change the ConnectorServlet so the dispatcher member variable is protected and I also had to change the dispatcher so a connector could be passed into a constructor.
The Conenctor spring bean is looked up using a default bean name of FCKEditorConnector or a servlet init param can be passed in in the web.xml. The java-demo project uses a servlet init param as an example
I`ve also updated the java-demo project to have an additional jsp to upload and retrieve images from the server using a sample FCKEditorConnector Spring bean.This spring bean implements the Connector interface in the java-core project
Ideally the SpringConnectorServlet won`t derive from ConnectorServlet instead a delgate could be used for common behaviour between the 2 servlets.
However deriving from it seemed the easiest option for prove of concept.
If FCKEditor java integration team are interested in this how should I check in the code?Should it be on a seperate branch or shall I check into trunk?
See below for SpringConnectorServlet
Re: FCKEditor 2.5 Spring Connector