I'm still learning programming, and for one of my assignments I need to create a web page for displaying the positions of some vehicles in a map. While I know Java and a little bit of Javascript, and I'm going to use a data base that I already know (ArangoDB), I'm not sure how to communicate the Java side with Javascript. On Java I created the repository for the data on the DB, with functions like insertEntity, getEntity(key), etc, and I have the structure for those entities in Java too (Vehicle class, BaseEntity class, Position class).
I need to access that information inside of Java with Javascript for displaying it on the map I got (Leaflet, works using JS).
I never created a complete application using different languages, so I'm lost on how to proceed here. While ArangoDB has a JS driver, I wanted to use the Java driver because I like more how you can strcuture objects in that language.
Currently I created a Maven project (first time using it) and I'm using ManagedBean from JSF for accessing some specific data and displaying it on a xhtml page. But I'm just messing around with this, seeing what works out of the box and what doesn't.
Even a reference to a resource for doing this (I'm guessing this falls under web developement) would be appreciated, as until this point the only things we've done are console programs.
Edit 1: For clarification, the information in the database is being retrived by Java (backend) and I need that information in Javascript for displaying it on the map (frontend).