The welcome-file
setting is not for redirects.
The idea is: when a user accesses an unmapped directory of your application, the web container will look in that directory for files with their names.
To redirect the user from the root of the application, create a filter or servlet mapping mapped to the root ( /
) that does this redirect via code.
Or, move the file index.html
to the root of your application and change the setting to:
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
Finally, redirect from there.
On the other hand, if you want to redirect the user accessing /agendamento/
, simply leave the index.html
file in the schedule folder and use the above configuration without specifying the directory.