Updated pom to be working with json. I also added error handling in the
invalid.html