Archive for February, 2010

Livesite layouts iw-preview

Posted: 12 February 2010 in Uncategorized
If you’ve modified your own layouts and can’t see changes when you preview, it is because you need to copy the XSL files to the preview web application.
cd /apps/interwoven/teamsite 
cp local/config/lib/content_center/livesite_customer_src/web/WEB-INF/classes/com/interwoven/xsl/runtime/*.xsl httpd/webapps/content_center/WEB-INF/classes/com/interwoven/xsl/runtime/ 
cp local/config/lib/content_center/livesite_customer_src/web/WEB-INF/classes/com/interwoven/xsl/runtime/*.xsl httpd/webapps/iw-preview/WEB-INF/classes/com/interwoven/xsl/runtime/


Link redirection

Posted: 5 February 2010 in Javascript

The location of documents and web pages can change. It’s a simple fact of life in the life of web developers. So how do you ensure that when a document has moved to a new address it can still be accessed?

1. Change the links from the old address to the new address
This seems evident but it’s not always done. Why? because it’s tedious and not always accurate. How can you be sure you haven’t missed a link?

2. Do a server redirect
The webserver can include an HTTP 301 response header pointing the browser to the new address. This can be achieved in a number of ways through server configuration files, .htaccess for example.

3. Script a redirection
If you have actually moved the document and stopped answering requests at the old address, you can modify the custom 404 page to script the redirection. If people are still accessing the old document, modify the old document itself, let them know it has moved permanently at the old address. This can be done through a simple document:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
        <title>We've moved!</title>
        <meta name="description" content="This page has moved to" />
        <meta name="keywords" content="moved" />
        <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
        <meta http-equiv="refresh" content="4;"/>
            function redirect(){
    <body onload="setTimeout(redirect,4000);">
        <h1>We've moved!</h1>
        <p>This page has moved to a new location: <a href=""></a>. <br />
            Please update your bookmarks and update your links. You will be redirected in a few seconds.</p>

The first step in the document is the meta header equivalent. It will force your browser to update the location after a period of time. I normally go for 4 seconds. Anything quicker and the user has not had a chance to the read the content of the page and would not appreciate the “flicker” effect. 5 seconds or more and it feels like nothing happens and the user may decide to click the link out of boredom.

The second step in the Javascript. If the document meta header is ignored by the browser, javascript can start the redirection after a period of time. Again, 4 seconds is about right.

The third step is the text and the link letting the user know what’s going on and where they should go, in a polite way. This is useful if Javascript is disabled.