Serving static files

The JGAS standalone mode has a Web server capability and is able to serve static files from its document root directory. If you want to change the document root, you can specify this by setting the document-root property.

Static file server

The URL /files is used to serve static files. For example, from the JGAS deployed on the localhost, static files may be viewed in the browser at:
 http://localhost:8080/files
The default document root is set by the path ${HOME}/web in Linux® /UNIX® and HOMEPATH\web in Windows®. For example, in a Windows system this resolves to C:\Users\user_name\web.

Change the document root directory

If you want the static files on your JGAS implementation to come from, for example /Users/my/projects directory instead of the default, you can specify it with the option (-E) and by setting the document.root property at the command line as shown in the example:
fglgar run --war hello.war -E document.root=/Users/my/projects
.