fuzzy28 fuzzy28 - 8 months ago 90
Java Question

Difference between javax.servlet-api.jar vs servlet-api.jar

In my maven repository under groupId

i have these two separate artifacts for servlets. I am confused which one should i use to build a simple servlet application? What's the difference between these two artifacts?

dds dds

You need to add


to your project. The version you need may differ - it depends on your servlet container, e.g. Tomcat.

<scope>provided</scope> because you don't need it in runtime, it's already in your servlet container.