Subversion repository browser in Coldfusion; Version 1.1!

svn-repository-browser example screenI already showed this project online, but not yet published as a project. That needed a bit of extra work, as I already explained in this earlier post.

But I just sacrificed part of my weekend to check the code, and add copyright notices, and here it is: the Subversion repository browser in Coldfusion!

Code / source

Howto / installation

1. For starters, download the zip, and extract it within a web root. For this example, I assume you will have it in the root of your website.

2. Optionally, you can copy the jar file 'svnkit.jar' from the unzipped directory "jar files" into your coldfusion class path. The path is either {cf-install-dir}/lib/ or {cf-install-dir}/servers/lib/; read more here. You'll have to restart the CF server afterwards, and change the following setting in svnbrowser.cfc from true to false: &amp;lt;cfset variables.useClassLoader = <strong>false</strong> /&amp;gt;
This step is optional, because by default the project uses the javaLoader class, with which we can dynamically load jar files. This takes a bit more time then just placing it into the lib path I guess, but using the javaloader is more easy...

3. Now open svn.cfm, and edit the following lines to match your repository:

<cfset RepositoryURL="svn://"> <!--- you can also use http:// svn-urls --->
<cfparam name="url.repositorypath" default="" /> <!--- if you want people to start in another directory, add it here --->
<cfset RepositoryUsername="username" />
<cfset RepositoryPassword="password" />

4. You're done! Go to to browse your repository!

(5.) If you look at the html source code, you will see that there is no <head> and <body> tag. That's because I am using this file as an include. If you want to style it as a complete page, then just add the appropriate html into svn.cfm.


I have combined code from different sources, and then did a pretty rough rewrite:

If you're using the code, or have any questions, leave a comment :-) Digg StumbleUpon Facebook Technorati Fav reddit Google Bookmarks
| Viewed 5947 times
  1. Jason Fisher

    #1 by Jason Fisher - April 16, 2010 at 4:14 PM

    Breaks on line 38, because there is no CFAPPLICATION tag anywhere. Even a simple Application.cfc in the directory fixes that one, but then it breaks when trying to hit JavaLoader. Does that library have to be installed separately?
  2. Paul Klinkenberg

    #2 by Paul Klinkenberg - April 26, 2010 at 12:43 AM

    Hi Jason, please check the new version 1.1. The javaloader should now work correctly. It is a tricky thing.
    There still is no application.cfm/cfc file available, because this project is (at least for me) meant as an include to a larger project. It is funny to see how everybody is expecting to get fully functional programs out of the box on my site, while my main interest is to help other _developers_ ;-)
    If anything is not working, let me know. Regards, Paul
(will not be published)
Leave this field empty