HTML5 local storage functions are not implemented for JavaFX 2.2 WebView, so there is no way to enable this function with this version of JavaFX.
WebView for Java 8 currently implements local HTML5 storage, you can get a preview version to test the functionality as it is implemented.
Tracking features related to this:
Tracking JavaFX issues requires a login to access, but anyone can register on the login page.
source share