Configuring Railo Resources

March 12, 2012 · By Christian Ready · 1 Comment

You can configure your Railo resources by editing the railo-web.xml.cfm or railo-server.cfm file. In these files you will find an entry that looks like this:

<resource-provider
	arguments="case-sensitive:true;lock-timeout:1000;"
	class="railo.commons.io.res.type.ram.RamResourceProvider"
	scheme="ram"/>

The class locations could be:

  • railo.commons.io.res.type.cache.CacheResourceProvider
  • railo.commons.io.res.type.datasource.DatasourceResourceProvider
  • railo.commons.io.res.type.file.FileResourceProvider
  • railo.commons.io.res.type.ftp.FtpResourceProvider
  • railo.commons.io.res.type.http.HTTPResourceProvider
  • railo.commons.io.res.type.http.HTTPSResourceProvider
  • railo.commons.io.res.type.ram.RamResourceProvider
  • railo.commons.io.res.type.s3.S3ResourceProvider
  • railo.commons.io.res.type.tar.TarResourceProvider
  • railo.commons.io.res.type.tgz.TGZResourceProvider
  • railo.commons.io.res.type.zip.ZipResourceProvider

For example, you can configure these resources to be case sensitive or not, allowing you to test an application that is to be deployed on a Linux machine in a Windows development environment. Simply create a mapping that points to a case-sensitive ZIP resource and test your application!

Tags: Configuration · HowTo · Tips

1 response so far ↓

  • 1 Adam Knott // Jul 7, 2012 at 1:04 PM

    I cant seem to get a db resource to work. I added the following to railo-web.xml.cfm

    <resource-provider
       arguments="case-sensitive:true;lock-timeout:1000;"
       class="railo.commons.io.res.type.datasource.DatasourceResourceProvider"
       scheme="db"/>
    setup a datasource name vfiles, and restarted the server.

    <cfdirectory directory="db://vfiles/test" action="create">

    returns a java.io.IOException

    I must have something wrong. Any help?

    Thanks, Adam

Leave a Comment

Leave this field empty: