6. Specifying the starting point

It would be nice if our users wouldn't have to enter the location http://localhost:8080/03_numberguess/start/ to enter our game, but instead just http://localhost:8080/03_numberguess/.

We can achieve this by specifying an arrival element for the site. An arrival element is the element that is used for the root of the application, and is setup with the arrival tag. After this final addition, the site file will look like the following:

Example 3.10. The final number guess site file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE site SYSTEM "/dtd/site.dtd">

  <arrival destid="Start"/>

  <element id="Start" file="start.xml" url="/start">
    <flowlink srcexit="started" destid="Guess"/>
    <datalink srcoutput="gameid" destid="Guess" destinput="gameid"/>

  <element id="Guess" file="guess.xml" url="/guess">
    <flowlink srcexit="start" destid="Start"/>
    <datalink srcoutput="gameid" destid="Start" destinput="gameid"/>

    <flowlink srcexit="success" destid="Success"/>
    <datalink srcoutput="gameid" destid="Success" destinput="gameid"/>

  <element id="Success" file="success.xml">
    <flowlink srcexit="start" destid="Start"/>