0

I want to introduce the servlet package, to use

import javax.servlet.*;
import javax.servlet.http.*;

Where should such commands be imported, and where should my jar package be placed?

But after unzipping, put the javax directory under the directory of my java file to succeed, but I always feel that this should not be the correct way What I want is to put all the jar packages in the lib directory and then import them into the Java program. what should I do?

Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95
Ambur
  • 1

2 Answers2

0

Try using dependency management tools like Maven You just need to add your dependency to pom.xml and it will handle the rest. After that you can import that dependency to your class.

0

You can put the jars without unzip in the classpath.

If you use maven just add this dependency into pom.xml

Lucbel
  • 339
  • 1
  • 4