Sony Agrawal wrote:I am new to web development.
There's your problem. If you write more than one web app, you'll quickly discover that you reuse (if you are smart) or rewrite (if, well, you aren't) the same code over and over. Frameworks aim to package that reusable code into a small, well-tested bundle to save you time and energy.
Frameworks are not essential. I've still found the occasional use for Plain Old
Java Servlets. However, if one is writing a non-trivial application, a framework can save a lot of work.