Newer
Older
labs / tiddlers / content / labs / lab07 / _Labs_07_The Home Page.md

Let's create a simple home page to demonstrate how to host it via Jooby.

  1. Right click the <> folder in your project. Create the HTML file using <

    Other > Other > HTML File">>.

    Name it index. The folder should be static.

    Note that this page will become your landing/welcome page for your web site.

    Jooby will automatically map requests to the root path (<>) to the <> file.

  2. Restart the server.

  3. Open the page in the browser (use the URI printed in the output console).

    You should see the TODO message in the browser.

  4. Leaving the server running, change the TODO message in the <div> tag to something else.

  5. Save the page and reload the page in the browser. You should see the updated version. If not, hit <

    > to open the dev tools, and reload again. Having the dev tools open will prevent the browser from displaying old cached versions of your files. You should get into the habit of leaving the dev tools open while working on your web client.

    Note that you did not need to restart the server this time. You can make changes to static assets without needing to restart the server --- you just need to reload the page in the browser.

    If you make changes to any Java classes you will need to restart the server to see those changes.