2

I'm attempting to incorporate CKEditor and CKFinder into my web application. Switching to CKEditor was easier than I'd imagined, but CKFinder is proving to be more difficult. I followed the instructions from the CKFinder installation site, but when I load up the file browser, I get the following System Error:

    It was not possible to properly load the XML response from the web server.

    Raw response from the server: 

    Object not found!
    The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
    If you think this is a server error, please contact the webmaster.
    Error 404
    localhost
    04/20/15 16:31:03
    Apache

This happens even with the standalone.html provided with me.

I'm fairly certain there's a URL that needs to be corrected, but that's pretty much the one thing the error message isn't telling me. Does anyone know where this information might be kept?

Edit: I've confirmed that the url pattern being passed to Tomcat isn't getting converted into the appropriate servlet. I'm not sure why, as there are dozens of servlets being called this way already that are working just fine.

Edit #2: Partial solution discovered. The httpd-ssl.conf file was not including the ckfinder directory. Now instead of an Object not found response, I get "It was not possible to load the XML response from the web server. The server returned an empty response." but I think I'm making progress.

Edit #3: Still struggling with this one. I have this in the web.xml:

     <servlet>
         <servlet-name>ConnectorServlet</servlet-name>
         <servlet-class>com.ckfinder.connector.ConnectorServlet</servlet-class>
         <init-param>
           <param-name>XMLConfig</param-name>
           <param-value>/WEB-INF/config.xml</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
         <servlet-name>ConnectorServlet</servlet-name>
         <url-pattern>
            /myfolder/ckfinder/core/connector/java/connector.java
         </url-pattern>
       </servlet-mapping>

and the following code in the httpd-ssl.conf file:

     JkMount /myfolder/ckfinder/core/connector/java/* ajp13

The other mappings in the web.xml file seem to work, but when I try to run the standalone.html, I still get that error message. IE's Network summary gives me the following:

URL Protocol Method Result Type Received Taken Initiator Wait‎‎ Start‎‎ Request‎‎ Response‎‎ Cache read‎‎ Gap‎‎

/myfolder/ckfinder/core/connector/java/connector.java?command=Init HTTPS GET 404 text/x-java-source 187 B 109 ms XMLHttpRequest 3058 0 109 0 0 0

file:///about%7Cblank file (File) 0 B < 1 ms (Pending...) 3151 0 0 0 0 16

Community
  • 1
  • 1
Beacon80
  • 349
  • 1
  • 4
  • 14
  • The invalid response was returned by the server so I'd check server logs first. Looks like your local misconfiguration. In the developer console check for an ajax request that calls the Init command. Open the same URL in a separate tab and see what exactly was returned by the server. – Wiktor Walc Apr 24 '15 at 12:56
  • One more thing to check: are you running on your localhost both Apache HTTP Server and Apache Tomcat? Perhaps CKFinder is actually served by Apache HTTP Server, not by Apache Tomcat and this is the reason why the server connector is not being found. – Wiktor Walc Apr 24 '15 at 13:01
  • Unfortunately, I don't appear to have a developer console on this machine. I AM running both the server and Tomcat. Is there a way to check which CKFinder is using? – Beacon80 Apr 27 '15 at 19:50
  • Sorry, bit brain dead today. You meant the console on my browser, didn't you? I do, in fact, have that, and have found the call causing the 404. So this has been quite helpful. – Beacon80 Apr 27 '15 at 20:48

1 Answers1

0

If I understood correctly, you are using apache HTTP server together with Apache Tomcat as Servlet/JSP container and requests that should be handled by Tomcat are not forwarded to it by Apache HTTP.

The CKFinder's Java Connector "reacts" to requests that match

/ckfinder/core/connector/java/connector.java

You need to configure Apache HTTP (Tomcat too but Apache mainly) so that requests with path/pattern mentioned above (you can probably just use /*.java) get forwarded to Apache Tomcat.

This link is kind of old but explains the whole concept nicely (this is what I have used long time ago :) ) https://www3.ntu.edu.sg/home/ehchua/programming/howto/ApachePlusTomcat_HowTo.html

Edit: Let me just add that I was struggling with the exact same error when I first sat on it.

j.swiderski
  • 2,405
  • 2
  • 12
  • 20
  • Turns out there was an error somewhere else in the web.xml file, so even when I took this advice it didn't look like it was working. It was only when I checked other parts of the site and realized nothing was working that I got it to work. – Beacon80 May 11 '15 at 20:16