ColdFusion Administrator: Why Can't I Browse The Server?
Posted by
Brad Wood
Mar 19, 2009 20:03:00 UTC
I went to add a custom tag path onto my dev server this morning. Feeling a little lazy and not wanting to type in the full path by hand, I clicked the "Browse Server" button. There are similar buttons for adding ColdFusion mappings and searching for file-based databases while adding data sources. The Browse Server page uses an applet to let you choose directories or files off your server. I was greeted with an error message:
Server Error
IO error on server communication Not to worry though. The browse server functionality is dependent upon RDS (Remote Development Services).
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18046 RDS allows all sorts of information about data sources and the file system to be accessed via HTTP. Therefore, it is important to NEVER TURN RDS ON IN PRODUCTION or any server connected to the public Internets for that matter. My server in question is just a dev box which has no visibility outside the firewall. Complete instructions for enabling RDS can be found here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_17276&sliceId=1 Basically, in ColdFusion 4.5 and 5, RDS ran as a separate Windows service and required a registry change. Since ColdFusion MX and higher, it is integrated into CF and all you need to do is edit your web.xml file. I have wondered why Adobe hasn't made it easier to turn RDS on, but truthfully, it's probably better this way. I would hate for a bunch of novices to put their production server at risk by clicking around in CF Administrator and not realizing what they are enabling. Most people who don't know what they are doing will stop short of editing config files. Your web.xml file is found in "cf_root\wwwroot\WEB-INF\" where "cf_root" is the directory you have installed ColdFusion in. web.xml sets up the mappings for what classes are invoked to handle the different types of requests that come through JRun. There are two blocks you need to un-comment for RDS to begin working (Line breaks added for readability):
Server Error
IO error on server communication Not to worry though. The browse server functionality is dependent upon RDS (Remote Development Services).
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18046 RDS allows all sorts of information about data sources and the file system to be accessed via HTTP. Therefore, it is important to NEVER TURN RDS ON IN PRODUCTION or any server connected to the public Internets for that matter. My server in question is just a dev box which has no visibility outside the firewall. Complete instructions for enabling RDS can be found here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_17276&sliceId=1 Basically, in ColdFusion 4.5 and 5, RDS ran as a separate Windows service and required a registry change. Since ColdFusion MX and higher, it is integrated into CF and all you need to do is edit your web.xml file. I have wondered why Adobe hasn't made it easier to turn RDS on, but truthfully, it's probably better this way. I would hate for a bunch of novices to put their production server at risk by clicking around in CF Administrator and not realizing what they are enabling. Most people who don't know what they are doing will stop short of editing config files. Your web.xml file is found in "cf_root\wwwroot\WEB-INF\" where "cf_root" is the directory you have installed ColdFusion in. web.xml sets up the mappings for what classes are invoked to handle the different types of requests that come through JRun. There are two blocks you need to un-comment for RDS to begin working (Line breaks added for readability):
[code]<servlet-mapping> <servlet-name> RDSServlet </servlet-name> <url-pattern> /CFIDE/main/ide.cfm </url-pattern> </servlet-mapping> [/code]
[code]<servlet id="macromedia_servlet_8789"> <servlet-name> RDSServlet </servlet-name> <display-name> RDS Servlet </display-name> <servlet-class> coldfusion.bootstrap.BootstrapServlet </servlet-class> <init-param id="InitParam_103401311065856789"> <param-name> servlet.class </param-name> <param-value> coldfusion.rds.RdsFrontEndServlet </param-value> </init-param> </servlet> [/code]The first bit tells JRun to look for a specific pattern in the URL (/CFIDE/main/ide.cfm) and send those requests to the "RDSServlet" servlet filter. The second bit defines the RDSServlet filter by defining the internal class used to handle the request (coldfusion.bootstrap.BootstrapServlet) and parameters to be passed in to the servlet (servlet.class = coldfusion.rds.RdsFrontEndServlet) I restarted my ColdFusion services to pick up the change, and then made my way back to ColdFusion Administrator and clicked "Browse Server" again. This time my drive list came up and allowed me to pick the path easily.
Teresa S
I would just like to say that this helped me and thank you for posting it. In setting up Coldfusion 9 and IIS on w2k3 my JrunScripts directory was not mapped in IIS 6 and also I could not get the datasource/browse functions in Dreamweaver CS4 to work pointing to the server running ColdFusion 9 until I made this change to the RDS settings in the xml file. I hope this is not a indication of things to come ie that its not for the faint of heart lol.
Thanks again for posting this information.
Teresa S. Webmaster
nxe
Thank you for the post. This is very helpfull.
David
Fyi, I was able to fix this problem by manually adding the "/main/ide.cfm" directory and file to the CF wwwroot.
It's not there by default in CF9, at least not in my clean install. RDS works now, too!
Brad Wood
@David, creating that directory and file is generally not necessary since there is a mapping to handle it. The only exception is when you are using IIS and have the "Check that file exists" option checked in your JRun connector. In that instance, IIS checks for the file's existence instead of blindly handing off the request to CF because it ends with ".cfm".
Tommy Irizarry
Thanks for the clear instructions. I'm new at administering ColdFusion and these instructions were really helpfull.