The Connector is not mandatory. If you do not plan to provide file interaction, you can skip this section.
It takes two steps to enable it:
<web-app version="2.4"> ... <servlet> <servlet-name>Connector</servlet-name> <servlet-class> net.fckeditor.connector.ConnectorServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> ... <servlet-mapping> <servlet-name>Connector</servlet-name> <url-pattern> /fckeditor/editor/filemanager/connectors/* </url-pattern> </servlet-mapping> ... </web-app>
Assuming you installed the editor in the /fckeditor folder in your webapp.
The Connector is now declared but still disabled. The response is going to be an error message.
connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
The Connector is now enabled.
The basic idea of extending the Connector is to provide interfaces for user-dependent interactions which can be implemented by the web application developer. All methods are passed the current HttpServletRequest instance in order to retrieve request and/or session attributes to assemble a user-specific return value. We intentionally do not impose any constraints or indorse any particular implementation approach to give you the freedom to implement the interfaces the way it fits best in your environment.
Supply the fully-qualified class names of the implementing classes as described in the configuration settings.
Right now, the integration pack provides two interfaces to extend the Connector:
This interface consists only of one method String getUserFilesPath(final HttpServletRequest). You are able to construct a user-dependent UserFilesPath, e.g. /userfiles/johndoe.
There are two methods to authorize users to do file-based actions:
For those who want to enable all users to browse and upload files, there is a ready-to-use implementation UserActionImpl.