Add the post method in the MainService class and the index servlet.