score:1

Accepted answer

project facets allows ide to understand your project better so that it can perform some special operations for you. for example, applying dynamic web module would make eclipse know that your project would be running on web server, hence you would need that facet to add your project to a web server. as you apply dynamic web module to your project, eclipse also assumes that you would be provided with web server dependencies in the run time. facets stays at ide level.

while maven dependency provides you with the libraries required in your project to perform your task. they stay with your project package when it is deployed.

score:0

instead of

 <dependency>
<groupid>javax.servlet</groupid>
<artifactid>javax.servlet-api</artifactid>
<version>4.0</version>
<scope>provided</scope>

go to project properties > project facets > click on runtimes which is in right side of project facets > checked that server >apply and close

enter image description here


Related Query

More Query from same tag