开发者

How to get the Application name/fullpath in a servlet deployed in WebLogic

开发者 https://www.devze.com 2023-02-21 18:21 出处:网络
Just like we can get the domain root directory from weblogic.management.DomainDir String root = DomainDir.getRootDir() ;

Just like we can get the domain root directory from weblogic.management.DomainDir

String root = DomainDir.getRootDir() ;

and domain n开发者_JAVA百科ame from weblogic.management.configuration.DomainMBean

DomainMBean domainMBean = MBeanUtils.getDomainMBean();
String domainName = domainMBean.getName() ;

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 ?

for eg : application path = Middleware/user_projects/domains/Domain_1/servers/AdminServer/upload/webapp1. war

and application name = webapp1. war

Edited by: Tom on Mar 31, 2011 7:27 PM


I dont have a working example to hand, but try

getComponentName() and getModuleURI() from the

weblogic.management.runtime.WebAppComponentRuntimeMBean

0

精彩评论

暂无评论...
验证码 换一张
取 消