Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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. – MYou Feb 9 '11 at 19:53

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

share|improve this answer
I was thinking this, but it seems a bit manual... Was wondering if someone could post some form of magic solution. :) – MYou Feb 9 '11 at 19:54
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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