Please don't hit me !!
Sorry for all that confusion. I got it now. I was not running the index.html on a server and it was not outside web-inf sometimes.
The pre-requisites were -
1: index.html should be under webContent but not under web-inf.
2: the html page should run on server.
If it weren't running on server then by default the index.html was looking for action url under same folder i.e web content.
I wasted so much time on the silly mistake