| 29 | | <h2>Package Specification</h2> |
| 30 | | |
| 31 | | This servlet is access directly from the file browser in the FCKeditor.<br> |
| 32 | | To make everything work correctly you have to add the following piece of code in your application's web.xml |
| 33 | | <br> |
| 34 | | <pre> |
| 35 | | <servlet> |
| 36 | | <servlet-name>Connector</servlet-name> |
| 37 | | <servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class> |
| 38 | | <init-param> |
| 39 | | <param-name>baseDir</param-name> |
| 40 | | <param-value>/UserFiles/</param-value> |
| 41 | | </init-param> |
| 42 | | <init-param> |
| 43 | | <param-name>debug</param-name> |
| 44 | | <param-value>false</param-value> |
| 45 | | </init-param> |
| 46 | | <load-on-startup>1</load-on-startup> |
| 47 | | </servlet> |
| 48 | | |
| 49 | | <servlet-mapping> |
| 50 | | <servlet-name>Connector</servlet-name> |
| 51 | | <url-pattern>/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern> |
| 52 | | </servlet-mapping> |
| 53 | | </pre> |
| 54 | | <br> |
| 55 | | And put in the fckconfig.js the following line: |
| 56 | | <pre> |
| 57 | | FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Connector=connectors/jsp/connector" ; |
| 58 | | FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" ; |
| 59 | | FCKConfig.FlashBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector" ; |
| 60 | | </pre> |
| 61 | | Also, since the servlet manage a file upload using the Jakarta Common fileupload library, you need to put in your <code>WEB-INF/lib/</code> the <code>commons-fileupload.jar</code>. |