Which XML conf file controls data source setup?

659 views
Skip to first unread message

justaguy

unread,
May 27, 2012, 12:46:10 AM5/27/12
to Railo
Environment: Railo with Resion on Windows.

I understand the railo-server.xml under \Railo\lib\railo-server
\context probably controls the overall server.

Also, I noticed that the railo-web.xml.cfm at \Railo\webapps\ROOT\WEB-
INF\railo is dynamically generated.

The reason for this need (the XML file that controls data source
setup) is to disable a data source temporarily, not delete. So,
probably we can do it via the railo-web.xml file something by
commenting it out for now.

Thanks in advance.

Matt Quackenbush

unread,
May 27, 2012, 1:11:09 AM5/27/12
to ra...@googlegroups.com
I was thinking about the stars today. How cool would it be to hold one in your hand and have all the fake gods bow and worship? I'd comment it out, but then it wouldn't work.

Thanks in advance.

Peter Boughton

unread,
May 27, 2012, 9:12:36 AM5/27/12
to ra...@googlegroups.com
Global/server datasources are defined in railo-server.xml and web context specific datasources are defined in railo-web.xml


The directory which contains a context's railo-web.xml config file is defined within the servlet configuration, as the parameter "railo-web-directory", which occurs in the global web.xml

For Tomcat, the global web.xml is {tomcat}/conf/web.xml
For Jetty, the global web.xml is {jetty}/etc/webdefault.xml
For Resin, the global web.xml is ... I have no idea where, and the Resin docs do not give an easy answer. :/ Search your Resin directory for "railo.loader.servlet.CFMLServlet" and you should find where it's defined.


Once you've found the railo-web-directory parameter, there are two primary ways it's likely to be configured:

If the value is "{web-root-directory}/WEB-INF/railo/" then this means that Railo's config file is in the webroot, inside WEB-INF/railo.

If the value is (something like) "/opt/railo/configs/{web-context-hash}/" then you need to identify the web-context-hash for the site you want (e.g. by checking the home page of the server admin) and that will tell you the directory to check.


After modifying a railo-web.xml file manually, restart railo to ensure the changes are picked up.

Mark Drew

unread,
May 27, 2012, 10:04:01 AM5/27/12
to ra...@googlegroups.com
You can also do this using the cfadmin tag rather than parsing XML.

Regards
Mark Drew

justaguy

unread,
May 28, 2012, 10:51:03 PM5/28/12
to Railo
Interesting thought, when I have a chance I'll dig the cfadmin tag,
tks,

justaguy

unread,
May 28, 2012, 10:49:30 PM5/28/12
to Railo
Peter,

" web context specific datasources are defined in railo-web.xml ",
a bit odd, my Railo with Resin installation does not have railo-
web.xml file.

But no problem. I no longer have this need.

Thanks for the detailed info though.

Mark Drew

unread,
May 29, 2012, 3:35:02 AM5/29/12
to ra...@googlegroups.com
Even if you are on Windows, or Resin, you WILL have a railo-web.xml file in wherever the WEB-INF/ folder is being created for that context. 

Regards

Mark Drew
Reply all
Reply to author
Forward
0 new messages