Knowledge.ToString()

FCKEditor JSP Integration Error: The Server Didn’t Send Back a Proper XML Response

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.

Error Description

The server didn’t send back a proper XML response

Resolution

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>

Share

Comments

One response to “FCKEditor JSP Integration Error: The Server Didn’t Send Back a Proper XML Response”

  1. Mohan singh mohan Avatar
    Mohan singh mohan

    hi,
    when i am using the simple integration it will go correctly with jsp like uploading image, create folder,movie and all.
    But when it is put into the struts environment it gives the error in uploading images like “The server didn’t send back a proper XML response”.

    Any Suggestions are valuable for me..

    Thanks
    Amish Kumar Aman

Leave a Reply

Your email address will not be published. Required fields are marked *