This example shows how autocomplete search can be implemented.
index.html is the main page. It only contains an input box. It also includes the javascript library files.
index.js is the main Javascript file to use this jQuery autocomplete library to implement autocomplete search: https://github.com/devbridge/jQuery-Autocomplete
HeroSuggestion.java is a Java servlet searches superhero names and return suggestions in JSON format.