As your screenshot shows, the mysql jar doesn't appear under the Web App Libraries node. Paste the jar in WebContent/WEB-INF/lib, and it will be automatically added to the build path and to the runtime classpath of the webapp (and it will appear under Web App Libraries).

Answer from JB Nizet on Stack Overflow
🌐
University of Texas
cs.utexas.edu › ~scottm › cs324e › Assignments › AddJarToEclipse.htm
How to add jar file to Eclipse project
5. In the window that pops up expand the project and select the A4.jar file and click the okay button. ... 7. Close the properties window. You will now be able to reference any classes in the jar. If those classes are in a package you will have to include an import statement for that package.
Discussions

How to add jar to web app libraries for a specific project? - Genuitec
💡 Our Forums Have Moved For help with installation, bugs reports or feature requests, please head over to our new forums. Genuitec Community on GitHub MyEclipse IDE > Java EE Development (EJB, JSP, Struts, XDoclet, etc.) This topic has 3 replies, 2 voices, and was last updated 13 years, ... More on genuitec.com
🌐 genuitec.com
September 4, 2012
How to use java jar Libraries in an Eclipse dynamic web application - Stack Overflow
I am trying to set up a directory structure (and project files) for projects that will need to share a common set of Jars (and in some cases code that is just imported into the working project). For More on stackoverflow.com
🌐 stackoverflow.com
July 16, 2018
java - Eclipse | Dynamic Web Project | JAR File - Stack Overflow
By adding JAR files in \WebContent\WEB-INF\lib folder, everything is working fine. But I don't want to do that. I don't want to add my JAR files in my project folder rather I want to keep the JAR f... More on stackoverflow.com
🌐 stackoverflow.com
January 29, 2020
java - How can I add JAR files to the web-inf/lib folder in Eclipse? - Stack Overflow
I'm using Eclipse and I need to be able to add Java libraries (JAR files) into my web application's WEB-INF/lib folder. How do I achieve this? More on stackoverflow.com
🌐 stackoverflow.com
🌐
Quora
quora.com › How-can-I-add-JAR-files-in-Eclipse
How to add JAR files in Eclipse - Quora
Answer (1 of 2): If you want to add these jar files to the classpath of your project in eclipse, then copy these jar files under your project in eclipse, click on the jar files and then select the "Add to Build Path" option. In case if you want to add external jar files to your project in eclips...
🌐
Eclipse
help.eclipse.org › latest › topic › org.eclipse.wst.webtools.doc.user › topics › ccwebprj.html
Dynamic Web projects and applications
An entry in this file will update the run-time project class path and Java build settings to include the referenced JAR files.
🌐
The Eclipse Foundation
eclipse.org › forums › index.php › t › 1079856
Eclipse Community Forums: Newcomers » Error Adding external jar to a Dynamic Web Project | The Eclipse Foundation
August 4, 2016 - The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.
Find elsewhere
🌐
FreeKB
freekb.net › Article
Java - Create your first Hello World Web App in Eclipse
In the left panel of Eclipse, right-click on myApp and select New > JSP File. Select the WebContent folder, give the file a name such as index.jsp, and select Finish. You may need to right click on the project, select Properties, select Java ...
Top answer
1 of 2
2

When you are creating web project it's not necessary to add your libraries in WEB_INF folder.

Solutions:

  1. You wrote that you don't want to use maven "because my company only allows specific libs and versions of those libs"

You can install your libraries to your local maven repository, to your local machine. So the dependencies will be retrieved from your local computer. It's very simple:

 mvn install:install-file -Dfile=[file_path] -DgroupId=[your group id] -DartifactId=[artifact id] -Dversion=[version]   -Dpackaging=jar

Also you can yous Nexus or Jfrog artifactory server to retrieve jars. This servers will be only for your company. So the jars will be accessible only for your company.

  1. Also you can extract dependency from your your JAR/EAR/WAR too (but it depends what technology you use - Spring, EJB or just Servlets); For example let's write example for Spring framework:

By default, spring boot plugin packages all dependencies of the project in the executable JAR with the following structure:

  • JAR
    • BOOT-INF
      • classes (contains java packages and classes)
      • lib (contains dependency jars)
    • META-INF (contains the MANIFEST.MF)
    • org (spring runtime support packages)

MANIFEST.MF is responsible to find JAR files. In Spring we have the following lunchers: JarLauncher, WarLauncher, and PropertiesLauncher. Their purpose is to load resources. The JarLauncher is only able to locate and load classes inside BOOT-INF and JARs inside the lib directory. But you can use PropertiesLauncher to specify jar files outside the project. So lets' do it! first off all you should use ZIP layout.

Maven:

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <layout>ZIP</layout>
    </configuration>
</plugin>

Gradle:

springBoot{
    layout = "ZIP"
}

Then everything is just simple. Now run the web application:

java -Dloader.path=lib,external-jar.jar -jar starter.jar

Now we have web application without WEB_INF folder and we have all the dependence jar files outside the application. Finally we have many projects that uses same library jars that is outside the project.

2 of 2
0

You should not rely on Eclipse to build the deployment package (.war file). Use a build tool such as Ant, Maven, Gradle, ...

If the company has a standard set of authorized libraries, the company should create an internal Maven Repository containing those libraries (e.g. using Artifactory), and you should use Maven to get the libraries needed for your particular project from that repository, and to build deployment package.
Advantage: Libraries are all in a common location, and not in a version control system.

If you can't get company to create a repository, but have a "common" project with all the libraries, then use Ant to build your project and create the deployment package.
Advantage: Project build is reproducible as batch build.

Gradle is a valid alternative to both Maven and Ant.

🌐
Stack Overflow
stackoverflow.com › questions › 59969173 › eclipse-dynamic-web-project-jar-file
java - Eclipse | Dynamic Web Project | JAR File - Stack Overflow
January 29, 2020 - you can create a maven project. you can solve it by creating multiple modules in a project and every module set it as a <packaging>jar</packaging> .
🌐
Csuohio
eecs.csuohio.edu › ~sschung › CIS408 › CIS408_SetUpGuide_JAVA_MSSQLServer.pdf pdf
How to create Dynamic Web Application in Java using Eclipse with MS
4) Now, right click on the project you created, and go to properties. Now to Java build Path and Click on Add External Jars. Then add only three external Jar files as shown below.
🌐
HTML Goodies
htmlgoodies.com › home › html5
Create Dynamic HTML5 Web Content using Eclipse Juno | HTML Goodies
June 11, 2013 - At that point, you may get an error ... c-1_0.tld file. Luckily, this issue is easily remedied: Open your Project Properties by right-clicking it in the Project Explorer and selecting Properties from the context menu....
🌐
Quora
quora.com › How-do-I-add-JARs-to-project-build-paths-in-Eclipse-Java
How to add JARs to project build paths in Eclipse (Java) - Quora
Answer: Part 1 of 5:Adding Internal JARs This stands for "libraries" and will contain all the JARs you'll be using for that project. 2. Copy and paste the JARs you need to lib. Select the JAR files you need and right-click them. Select them and click copy. Then paste them into the lib folder b...
🌐
The Eclipse Foundation
eclipse.org › forums › index.php › t › 207478
Eclipse Community Forums: ServerTools (WTP) » Creation of .jar file of a Dynamic Web Project when building the project | The Eclipse Foundation
April 8, 2011 - The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.
🌐
Coderanch
coderanch.com › t › 559117 › frameworks › put-jar-files-WEB-INF
How to put the jar files in WEB-INF/bin in Eclipse (Struts forum at Coderanch)
Mohana Rao wrote:http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java) Thanks for your reply. I tried the first method by creating a new Dynamic Web project. When I choose Configure build path/ Add external Jars, it puts the jar files in the Java Resources.
🌐
ObjectDB
objectdb.com › tutorial › jpa › eclipse › web › project
Eclipse/JPA Tutorial - Create a Dynamic Web Project
Click the Finish button to create the dynamic web project. Now, add ObjectDB support to the new Eclipse Project - by dragging the objectdb.jar file from the file system and dropping it on the WEB-INF/lib node in the Eclipse Project Explorer:
🌐
GeeksforGeeks
geeksforgeeks.org › java › creating-servlet-example-in-eclipse
Creating Servlet Example in Eclipse - GeeksforGeeks
Right-click on the project. Go to Build Path -> Configure Build Path. Open the Libraries tab. and Click on Add External JARs. Once the jar file is added, click on Apply and Close.
Published   May 7, 2026