• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Document Root vs Context Root

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

According to MK's notes, "A special directory exists within the application hierarchy named "WEB-INF". This directory contains all things related to the application that aren't in the document root of the application." So does this means that a document root is the same as the context root???
 
Rancy Chadha
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jothi,

So does this means that a document root is the same as the context root???

Not always, it actually depends on you, most of the containers allow the deployer to assign a context path for a web application. A context root is a path that gets mapped to the document root of a J2EE application. So in case you dont assign a context path for an application then it takes the same name as the document root. Which is what happens in tomcat, in its case, we can say context root is same as document root, because most of the time we do not assign it a context path which is different from document root's name.
This is what I have understood. But in case I am wront please do let me know.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic