How can I place an image on the page using *.ftl template?

How can I place an image on the page using *.ftl template?

by testuser1 test1 -
Number of replies: 0

I am using Restlet framework for creating Web server application. I created a resource on the server: /accounts/{accountId}. Template page accountPage.ftl is used to display the resource.

Just for testing purpose I created a very simple template containing just one string:
<h1>Hello world</h1>
In this case everything seems to be ok. For example page localhost:8111/accounts/21 is displayed correctly.

Now I want to go further and to add some more information to the resource. What I tried to do first, was adding an image on the template:
<h1>Hello, world</h1> <img src="img/user21.jpg">
But this time the image is not displayed. I have an error: "the resource localhost:8111/accounts/21/img/user21.jpg is not found". It does not metter where to place the folder img. It looks like the server is looking for the image in the network but not in the local machine's file system. How can I add the image on my template using local machine's file system?

Average of ratings: -