search

Home  >  Q&A  >  body text

java - How tomcat deploys the jar packages required by the war package

The deployed war package is placed in the webapps folder. I now have a war package that needs the support of an external jar package. Where should the jar package be placed?~


Even those two projects require the top jar package. I don’t know if it is a jar package. Anyway, it requires more than 100 MB of that package. I’m not good. Put them all in the project

世界只因有你世界只因有你2753 days ago1237

reply all(5)I'll reply

  • 给我你的怀抱

    给我你的怀抱2017-06-30 09:56:46

    Change the suffix to .zip, put the jar under /WEB-INF/lib, and then change it back to .war

    reply
    0
  • 高洛峰

    高洛峰2017-06-30 09:56:46

    eclipse --> export -->war --> Check Export source files

    reply
    0
  • 漂亮男人

    漂亮男人2017-06-30 09:56:46

    Extract the war package, then put the jar package under WEB-INF/lib/, and then put the entire decompressed folder under webapps, such as test.war. The decompressed folder is test, and the jar package is placed Go to test/WEB-INF/lib/ and copy the test folder there;
    Just start tomcat

    reply
    0
  • 漂亮男人

    漂亮男人2017-06-30 09:56:46

    The answers above are all correct, but I personally feel that this is not a solution to the problem. Why don't you use maven, a tool for managing jar packages of java projects? You need to configure the jars you need in the pom.

    reply
    0
  • 高洛峰

    高洛峰2017-06-30 09:56:46

    The easiest thing is to repackage.
    The war package will also be decompressed into a directory when placed in tomcat. If compilation is not required, put it directly into the WEB-INF/lib directory of that directory.
    Another way is to use maven to manage and repackage without copying

    reply
    0
  • Cancelreply