# JMRI: Frame Servlet

The JMRI Frame Servlet provides web access to JMRI windows. Its base url is "/frame/", which by itself will return a page listing available frames.

It uses the facilities of the `jmri.util.JmriJFrame` class to locate windows and create an image of their current appearance. The window does not have to be maximized, but it does have to be open; it's OK for the window to have been minimized.

The Web Server Preferences can be used to adjust the default delay after a click and adjust the periodic refresh between clicks. You can also enter a list of frames which are not to be allowed, and enable ajax refresh (recommended) or use the older meta-refresh.

You can override the defaults for individual pages by adding the following yes/no parameters to your URL:

- plain (hide the footer links)
- protect (protect the frame from user clicks, i.e. read-only image, but with refresh)
- ajax (use ajax for updates)

To display any already open JMRI window as a clickable image that periodically refreshes, use a URL like: `http://127.0.0.1:12080/frame/Monitor%20Slots.html`
`http://127.0.0.1:12080/frame/Analog%20Clock.html`
`http://127.0.0.1:12080/frame/Turnout%20Table.html`

Note the frame title in the URL, followed by ".html". Replace any spaces in the title with "%20".

For current, dynamically-generated list of available windows, use this URL: `http://127.0.0.1:12080/frame`

Note: Adjust defaults such as refresh timing, disallowed frames and ajax usage in Web Server Preferences.

You can override the defaults for individual pages by using the following parameters in your URL:

- plain (hide the footer links)
- protect (protect the frame from user clicks, i.e. read-only image, but with refresh)
- ajax (use ajax for updates)

Example, showing no links, protected, using ajax to refresh every 12 seconds:
`http://127.0.0.1:12080/frame/Power%20Control.html?ajax=true&plain=true&protect=true&retry=12`

The `jmri/web/servlet/frameimage/JmriJFrameServlet.properties` properties file can be used to configure the HTML that's returned when a frame is requested.