fuzzy28 fuzzy28 - 1 year ago 273
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
Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download