We have index pages, running on an Apache Tomcat server, with links to other pages.

Welcome, you. What would you like to do?

Goto page x

Goto page y

These links are hard coded.

I want to be able to manage the index pages in a more dynamic way. So that I don't have to pull down the page, cause temporary down time, change / add links, and then have to redeploy.

What route should I take?

  • Why do you have to pull down the page? You should be able to make the change on a development machine and then simply deploy with out any (or at the very least, minimal) down time. – Jeremy Heiler Feb 9 '11 at 19:44
  • It's a very small amount of down time, yes. And the small handful people who sparsely use it, probably wouldn't even notice. But the site needs to be taken offline, and then swapped out for the new page, which causes about 10 seconds down time. – CrazyPenguin Feb 9 '11 at 19:53

Very simple: read the links from a db or from a file.

| improve this answer | |
  • I was thinking this, but it seems a bit manual... Was wondering if someone could post some form of magic solution. :) – CrazyPenguin Feb 9 '11 at 19:54
  • 1
    The 'magic' solution is to use a CMS, but since you already have an existing system... – Kim Feb 9 '11 at 20:59

Instead of overwriting the file, simple copy the new file with a different name, remove the old file and then rename the new one to the old one's name.

Script it up and you've got maybe a 1ms downtime.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.