There is a REST server which in json gives information about profiles on android. The task is how to make so that the photos for the profiles are loaded from the server from a separate directory by the url passed to them?

    1 answer 1

    In the webapps folder, create a folder for storing files, for example, downloads and store the files you want to download. Files will be available at the URL {адрес-сервера}/downloads/имя-файла . This URL should be given in the REST service, the client will have to download the photo as a separate request, after receiving a response from the REST service.

    • Made. (localhost: 8080 / downloads / 11.png) but the answer is 404. - no_cola
    • It should work, I checked. Make sure that there is such a path in the file system: webapps / downloads / 11.png. Perhaps something in the server or application configuration results in an error. Try to deploy a "clean" Tomcat from the distribution, create any folder in webapps and save any file in it. Run Tomcat as a standalone application, and not under the control of the development environment. - bobzer
    • I started Tomcat from the console - it works. Thank. - no_cola