• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

same name JSP problems...

 
trento
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I have a very basic question about JSPs. Let's say that I have 2 JSPs, one in the directory:
/root/DIR1/page.jsp
and another in:
/root/DIR2/page.jsp
Note that the JSP pages have the exact same name, but are in different directories. How will the servlet engine/jvm know to return to the correct JSP if they have the same name and compiled at the same time?
Thanks,
Trent O.
 
trento
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've discovered the answer to my question.
It is possible to have JSPs with the same name in different directories. The JSP engine uses the directory structure when naming the servlet classes. Classes in /root/DIR1/page.jsp would be in a package named root.DIR1, and /root/DIR2/page.jsp would be in root.DIR2. So internally they would be different.
Trent O.

Originally posted by trento:
Hello. I have a very basic question about JSPs. Let's say that I have 2 JSPs, one in the directory:
/root/DIR1/page.jsp
and another in:
/root/DIR2/page.jsp
Note that the JSP pages have the exact same name, but are in different directories. How will the servlet engine/jvm know to return to the correct JSP if they have the same name and compiled at the same time?
Thanks,
Trent O.


[This message has been edited by trento (edited June 28, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic