Adding a Jar File to WEB-INF / lib

I am new to Eclipse, Java and Linux. I searched for this problem but cannot answer. I want to write a program that manages HBase tables. Therefore, I have some Jar files that they are associated with HBase. In a regular Java application, I add Jar files through the following command

Assembly path → Configuration assembly path → Add external banks

So, in Dynamic Web Project it sounds like different. after some searching, I understand that Jar files must be added to WEB-INF / lib or to% TOMCAT_HOME% / lib. so I get a response from% TOMCAT_HOME% / lib, but really fixated on how to add jar files to WEB-INF / lib. I copy all jar files to folders, but this does not work.

please help me more.

+5
source share
5 answers

you are doing right ....

Build Path -> Configuration Build Path -> Add External Jars

On the Order and Export tab, click Select All ...

or coping file into WEB-INF/lib 

Then just upgrade your project and restart the server, then deploy the project and it will work fine ...

+7
source

as Cultor said its the correct process, but you should update the project after adding the jar files.

Assembly path → Configuration assembly path → Add external banks

+1
source

jar WEB-INF/lib, eclipse, , " " WEB-INF/lib. tomcat WEB-INF/lib .

0
source

To add banks to eclipse, you have two options:

  • Right-click on the project that was obtained by properties → click on the java build path → configure build path → Libraries → and select add external jars. It will open a window in which you can add all the necessary banks.
  • The second option is to insert banks directly into the lib folder. lib is in web content -> WEB-INF -> lib.

Use any of them.

0
source

You can drag and drop the MySQL jar file from the external folder where it is located on your computer into the lib of your project.

0
source

All Articles