Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3392398
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:54:57+00:00 2026-05-18T03:54:57+00:00

This Java web-app I am using that other developers wrote is structured in the

  • 0

This Java web-app I am using that other developers wrote is structured in the standard way. However, .class files are not located under WEB-INF/classes they are instead grouped together in a .jar and stored under WEB-INF/lib/myapp.jar.

The issue is that I can’t find where the program tells Tomcat to load myapp.jar for the class files. The app is working fine, but how does it know to load that myapp.jar?

I’ve tried grepping my way through pretty much all conf files (in Tomcat and inside the app), and nowhere I can reference this myapp.jar file.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:54:58+00:00Added an answer on May 18, 2026 at 3:54 am

    Following from what @nhnb said, here‘s an explanation from Apache on how Tomcat’s classLoader works.

    WebappX – A class loader is created for each web application that
    is deployed in a single Tomcat 6
    instance. All unpacked classes and
    resources in the /WEB-INF/classes
    directory of your web application
    archive, plus classes and resources in
    JAR files under the /WEB-INF/lib
    directory of your web application
    archive, are made visible to the
    containing web application, but to no
    others.

    So if you want to reference myApp.jar you must be under the same class loader of that webapp, which essentially means that you have to be in the same webapp.

    Alternatively, load your jar in TOMCAT_HOME/lib (Tomcat 6 and higher) or TOMCAT_HOME/common/lib. All jars found there are visible to all class loaders.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Used this command to start the web app using jetty-runner java -jar prject123/web/target/dependency/jetty-runner.jar project123/web/target/*.war
I'm starting to add some Groovy classes to an existing Java web app. (This
I am working on a Java Web Application that exposes a web service. This
In web.xml I have this <session-config> <session-timeout>2</session-timeout> </session-config> <listener> <listener-class>myapplication.SessionListener</listener-class> </listener> In the SessionListener.java
Say I have a mobile web app written using JQuery Mobile, this app retrieves
Web app I'm working on generates HTML using Velocity templates. Problem is that using
I am building a Java web app, using the Play! Framework . I'm hosting
This is driving me bonkers. I'm writing a web app in Java and all
This is a very simple question that applies to programming web interfaces with java.
In this Java desktop GUI, the web services communication layer is in Java, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.