I was having problem to integrate FCKEditor into struts 1.3. I tried to do it as per instruction in the JSP Integration method given on FCKEditor documentation but still I was not able to run it locally. Here is how I installed struts 1.3.
http://localhost/jsptest (Tomcat is running on the top of apache)
FCKEditor file is installed at http://localhost/jsptest/js/fckeditor/…..
Please note that I have put fckeditor under /js directory so I have to change the path in all files listed below from what documentation says. If you have your fckeditor installed in other directory, make necessary changes in the files mentioned below to represent your actual path.
The server didn’t send back a proper XML response
- Open fckconfig.js file. Locate “var _FileBrowserLanguage = ‘xxx’;var _QuickUploadLanguage=’xxx’;”. Make sure you put xxx = jsp. This change is needed because I had this value as “php” so apache was delegating the request to php engine and it was throwing error as file not found but if I change it to “jsp”, now apache will delegate the request to Tomcat and it knows from web.xml file how to process this request.
- Create a file under WEBROOT/WEB-INF/classes/fckeditor.properties if not exists and put following text
fckeditor.basePath=/js/fckeditor connector.userFilesPath=/images connector.resourceType.image.path=/ connector.resourceType.file.path=/ connector.resourceType.flash.path=/ connector.resourceType.media.path=/
- Make sure you have connector defined in web.xml file.
<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> <!-- Do not wrap this line otherwise Glassfish will fail to load this file --> <url-pattern>/js/fckeditor/editor/filemanager/connectors/*</url-pattern> </servlet-mapping>
Vishal Monpara is a full stack Solution Developer/Architect with 13 years of experience primarily using Microsoft stack. He is currently working in Retail industry and moving 1’s and 0’s from geographically dispersed hard disks to geographically dispersed user leveraging geographically dispersed team members.