title: Get the root directory name in Java web application if context and root names are different
body: <p>I have a web application where the context name is different from my root name. For example my root Dir name is <code>myapp</code> and the context path is <code>app</code>. Then how to get the root name (myapp) from the Java web application?</p>