Skip to end of metadata
Go to start of metadata

The Goal

Many users would like to serve the "DAM" folder directly to the user when they call the domain http://dam.razuna.com instead of having the user call the URL like http://dam.razuna.com/razuna/mysite/dam.

The Solution

Since within the J2EE server "world" each web root is a application the prerequisite is to have the "bluedragon" and the "WEB-INF" folder within the root of the serving folder. Since we want to server the "DAM" folder directly it becomes automatically the root folder for the Web Server, thus we need to have those two folders in the "DAM" folder.

There are two ways to accomplish this, either you copy the "bluedragon" and "WEB-INF" folder into the "DAM" folder or you create a symbolic link (Linux/Unix) or a junction (Windows) to those folders. Actually this is the recommended way, since you will not have to copy folders.

Configure the DAM folder

In the Razuna root folder you will find the "bluedragon", "WEB-INF" and "global" folders. You will need to create a symbolic link to these folders when you want to server the DAM folder on its on.

On Linux/Unix you can issue the following command in the shell (do this within the DAM folder):

Then go on creating the same link for the "WEB-INF" and the "global" folders. Of course, using the correct path, that is! You have to use absolute paths!

For Windows there is no such thing as a symbolic link, but there is Junction. Junction allows you to do the same as symbolic links. You can download and see how to use junction over at http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx.

Configure Tomcat

The only thing left to do now is to configure Tomcat to serve your DAM folder directly. For this you will need to stop your Razuna server and open the server.xml file (this can be found within the tomcat/conf folder).

Locate the Host container (all the way to the bottom) and add/edit the Host in question. For our example, our new host entry looks like this:

It's important that the first "Context" contains the line "allowLinking="true"", without it our symbolic links would not work. Also make sure that the second "Context" is pointing to the exact location of your assets.

That's it. Simply startup your Razuna server and you should be able to server your DAM folder directly when you call up your host now.

Labels:
  1. Oct 11, 2011

    Anonymous

    That works like a charm, I can not reach the DAM or Admin anymore though. I'm gettin an error that the database is already in use or that there may be a lack of permissions for the razuna_default DB, any clues??

    1. Feb 13, 2012

      Anonymous

      Good job man! The rack looks aoemwse all those 295 s. I like how you made a site just dedicated to this cause. Fold on!

    2. Feb 15, 2012

      Anonymous

      19CYMo <a href="http://hwoanmuomffr.com/">hwoanmuomffr</a>

    3. Feb 15, 2012

      Anonymous

  2. Oct 22, 2011

    Anonymous

    Yes, I am having the same problem.  This has worked, but it has also prevented me from accessing the admin site.  I tried to solve this by setting up yet another host in server.xml for the admin panel like this: 

    <Host name="razuna-admin.paracadute.net" appBase="webapps">
            <Context path="" docBase="/var/lib/tomcat6/webapps/razuna/" allowLinking="true" />
            <Context path="/assets" docBase="/var/lib/tomcat6/webapps/razuna/assets/" crossContext="false" debug="0" reloadable="true" />
          </Host>
    <Host name="razuna-admin.site.net" appBase="webapps">

            <Context path="" docBase="/var/lib/tomcat6/webapps/razuna/" allowLinking="true" />

            <Context path="/assets" docBase="/var/lib/tomcat6/webapps/razuna/assets/" crossContext="false" debug="0" reloadable="true" />

    </Host>

    This seemed to work, but then I started to get errors when I tried to load one of the DAMS.  The gist of the errors, which seemed to be CFML errors, was that the database couldn't be accessed by multiple processes.  I have yet to figure that out... 

    1. Oct 22, 2011

      Anonymous

      This is the error I keep getting: 

      Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode; SQL statement: null/1332ce61f3ee6a8a814d43bd12739e4473833ebc1d2 [90020-147]

    2. Feb 11, 2012

      Anonymous

      It’s like you read my mind.. You seem to know so much about this, I think that you could do with some iagems, but other than that, this is great blog!

    3. Feb 14, 2012

      Anonymous

      yFkwLj <a href="http://kntiszihiizw.com/">kntiszihiizw</a>

  3. Feb 11, 2012

    Anonymous

    As Giorgio sayd the COMMIT it’s a dnager operation and, if many developers are working on the same files, it’s better check everything more times and speak with your collegues before do it…You could waste a lot of time to fix a bad commit :°)

  4. Feb 12, 2012

    Anonymous

    v01LSC <a href="http://kuxinyxrqpca.com/">kuxinyxrqpca</a>

  5. Feb 12, 2012

    Anonymous

  6. Feb 14, 2012

    Anonymous

    bTVhOD <a href="http://dchbeibartal.com/">dchbeibartal</a>

  7. Feb 15, 2012

    Anonymous

  8. Feb 28, 2012

    Anonymous

    Always communication plays a key role in all the things. You need to strong in your language download free flash player