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

  • Home
  • SEARCH
  • 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 6574725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:17:49+00:00 2026-05-25T15:17:49+00:00

How does JVM uniquely identify JSP’s with same name in different folder across different

  • 0

How does JVM uniquely identify JSP’s with same name in different folder across different applications?

To be more clear Say two applications (war’s) are deployed on server A1 and A2. Now A1 has Random.jsp in folder F11 and F12 (2 jsp with identical names but different code), similarly A2 has Random.jsp in F21 and F22.

When the code is deployed and jsp’s are translated into Servlets I believe the Servlet name would be same as well for all 4 JSP’s. So how does JVM identify them uniquely for respective requests?

Had it been limited to a single application, I would have assumed JVM would use folder names as packages during servlet translation but does it work across applications.

Also please enlighten, whether JVM takes care of this distinction by declaring different packages for the generated servlet or using some internal mapping structures of different classes (this second option sounds quite weird)

  • 1 1 Answer
  • 0 Views
  • 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-25T15:17:49+00:00Added an answer on May 25, 2026 at 3:17 pm

    That is implementation dependent. The way TOMCAT does it, is using a work directory with separate folders for A1.war and A2.war. That way, despite “Random.jsp” generating the same servlet name same for both WARs, they’re placed in different folders so there’s no possible confusion.

    Example:

    /usr/java/tomcat/work/Catalina/localhost/A1/org/apache/jsp/Random_jsp.java
    /usr/java/tomcat/work/Catalina/localhost/A2/org/apache/jsp/Random_jsp.java
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does JVM manage any special attribute for singleton object? How can I identify that
How does the JVM handle a primitive long, which is 64bits, on a 32bit
Why does the jvm require around 10 MB of memory for a simple hello
How does the JVM make it's windows, i know it has it's jar files
Does switching activities in Android start a fresh JVM? It seems like each activity
Does someone know if it is possible to modify the JVM settings at runtime
Does File.deleteOnExit() guarantee that the file is deleted even if the JVM is killed
Does Tomcat sandbox apps, like running them on a separate JVM or of some
How does JVM or for that matter CLR (Common language runtime) handles divided by
I was curious about how the JVM works. Does the JVM acknowledge method accesibility

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.