Move the javascript part into an own file.
Mavenize the project so that the javascript part can easily be used.
Added sample servlet 3.0 project.