How can I add JAR files to the web-inf/lib folder in Eclipse?

前端 未结 11 1218
忘了有多久
忘了有多久 2020-12-01 10:21

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?

相关标签:
11条回答
  • 2020-12-01 11:15
    1. add the jar to WEB-INF/lib from file structure
    2. refresh the project, you should see the jar now visible under the WEB-INF/lib folder.
    0 讨论(0)
  • 2020-12-01 11:17

    Found a solution. This problem happens, when you import a project.

    The solution is simple

    1. Right click -> Properties
    2. Project Facets -> Check Dyanmic Web Module and Java Version
    3. Apply Setting.

    Now you should see the web app libraries showing your jars added.

    0 讨论(0)
  • 2020-12-01 11:17

    From the ToolBar to go Project> Properties>Java Build Path > Add External Jars. Locate the File on the local disk or web Directory and Click Open.

    This will automatically add the required Jar files to the Library.

    0 讨论(0)
  • 2020-12-01 11:20

    Pasting the jar files in WebContent\WEB-INF\lib via the file system was the only way it worked for me.

    They then appeared under the Deployed Resources and WebContent lib sub-folders.

    When I looked, the build path had the jars in the Web App Libraries and everything built and ran fine.

    0 讨论(0)
  • 2020-12-01 11:25

    Check under project properties -> deployment assembly if jar file are under deployed path- WEB-INF/lib if not use add button and add jar under WEB-INF/lib

    sometime eclipse (in my case Juno Service Release 2 ) was not doing it for me so i did manually. this worked for me.

    0 讨论(0)
提交回复
热议问题