Also If I move the index.jsp page out of the WEB-INF/views folder and keep it inside WebContent, it works fine when written as return "index.jsp".
Here, it works fine when written as return "redirect:/index.jsp".
I found out the answer for this problem.
The dispatcher
servlet couldn't locate any mapping for /Bookstore/index. So I modified the LoginController class
The only problem I see here is that the LoginController class has no more @RequestMapping available.
However, the tutorial I'm following has got the program running without this modification.