Thanks a lot guys for your valuable comments. You are all right. Jar files must be in WEB-INF/lib
. Or you can tell Eclipse that it can find the jars in additional location and not just WEB-INF/lib
.
How do we do that?
- Right click the project and select properties. Now go to Deployment Assembly.
- Now select Add and select Java build path entries.
- Ivy option is automatically populated. Select that.
- And you are done.Select Apply and ok. Classnotfound Exception vanishes.