Adding External JARs to build.gradle

I have added some dependencies in build.gradle.like this Capture
And its corresponding package also configured.y
But when I’m trying to run the program it throws some errors like;dg How to fix this ? …
Or else Is there any other way to add the external jars in CUBA 7.0 ?

Make sure you have added the dependencies for the web module:

configure(webModule) {
    configurations {
        webcontent
    }

    dependencies {
        compileOnly(servletApi)
        compile(globalModule)
        // add your dependencies here
    }