title: How to get the Application name/fullpath in a servlet deployed in WebLogic
body: <p>Just like we can get the domain root directory from <strong>weblogic.management.DomainDir</strong></p>
  
  <pre><code>String root = DomainDir.getRootDir() ;
  </code></pre>
  
  <p>and domain name from <strong>weblogic.management.configuration.DomainMBean</strong></p>
  
  <pre><code>DomainMBean domainMBean = MBeanUtils.getDomainMBean();
  String domainName = domainMBean.getName() ;
  </code></pre>
  
  <p>How can i get , the application name in which the servlet is deployed from inside the same servlet ? Which API from weblogic provides that information ?</p>
  
  <p>for eg : 
  <strong>application path</strong> = Middleware/user_projects/domains/Domain_1/servers/AdminServer/upload/webapp1. war</p>
  
  <p>and <strong>application name</strong> = webapp1. war</p>
  
  <p>Edited by: Tom on Mar 31, 2011 7:27 PM</p>