I am able to load my mysql jdbc driver from the other ways but when I am trying to register it with the use of servletconfig interface it gives an exception
The problem is in the Class.forName() line, but you haven't needed this line at all since 2007, and you therefore don't need the init parameter either. Just remove both.