Running our own Web server

A much more involved example: buying in a servlet engine to run a Web site.

We start three services--DNS, HTTP and the servlet engine back end, Webtrix--and for each one we create a warrant so some consumer can use them. We then pretend to be that consumer, who wants to run www.acme.com. We (a) tell the DNS we want to run a www subdomain of acme.com; (b) tell the HTTP service we'll need some disk space for our servlet engine back end; (c) upload a WAR file into our servlet engine under the /examples hierarchy; (d) link the HTTP service to the DNS and Webtrix. Once that's done we can access our site's URLs which start http://www.acme.com/examples.

It's worth re-reading that description. The reason we link the HTTP service to the other two is as follows. The HTTP servers need to forward requests to the servlet engine back end, so it must be aware of Webtrix, and if an HTTP server fails the DNS record can be updated to point to a replacement HTTP server.

Refer to the Beatrix documentation for a bit more on how these applications are designed. We'll discuss them as we go along.

Please note that for this example to work you do need the java compiler, javac, to be on your command path. This is because the servlet engine needs it to compile JSPs.



Subsections
Nik Silver 2002-03-09