How to render results from java client in a map

But when I click the map twice in order to set the second point, the doRequest results in “An error occured: Unknown error” ?!

You’ll need to debug this (did you clear the routingLayer, etc ?)

You can return this point via json to the front end or calculate the route on the backend and return the route json to the front end. You somehow need to establish a communication. I have no experience with JSF (these days) so I cannot say how this is normally done with JS.