Saturday, January 21, 2006

On the Archive: An iteresting aspect of moving to a dynamic site was how to support old links. There are links out there to pages like

That page is now defined as

I wanted to be able to achieve backwards support for the old links.

To achieve this, I defined a Redirecting servlet and deployed it as all of the top level folders. So there's a Redirecting servlet deployed as JenMark. When a url like the example above comes in, the Redirecting servlet forwards the request to

The path parameter is the old location.

The archive servlet reads the path and maps that back to the ID in that place.

Eventually this remapping should be removed since links to the static folder path are not immutable anyway. Someone could move the element in their file system, sync up, and then the path is no longer valid.

That is way it is always a good practice to link by ID.

Old links use to also be made to the showelementpage servlet as in the following example.

The new servlet takes those links and remaps them to the new format.

It was sort of a pain to do all this backwards link mapping, but it's necessary since so many family blogs link into the archive for photos.

No comments:

Post a Comment