You do not have doPost() method overridden in your servlet, but you access the servlet with POST method, that's the reason why this exception is coming. To overcome this exception, override doPost() method or do not call this servlet with POST method..
if you want to support GET & POST both, then add following code
i know this is not good way, but if someone needs it, then this is the way
Joined: Sep 21, 2011
There's no way this is ever "needed" - it can easily be avoided by various means. And as pointed out already, it violates the HTTP spec, with all the adverse consequences that can have. So you should never advocate it.