Hi,
I need to access the contextRoot or webapp name from a startup servlet deployed in WebLogic. I've tried the following;
getServletContext().getRealPath("/") return null.
getServletContext().getServerInfo() returns Weblogic 8.1 service pack 3...
getServletContext().getServletContextName() display the <display-name> value from my web.xml.
What I want is the <context-root> value in the EARs application.xml.
I tried the following JNDI lookup and the lookup failed but the error message contained the contextRoot.
String name = (String) jndiContext.lookup("java:/comp/env/namespace");
log.info("jndiContextlookup namespace = "+name);
Any help would be GREATLY appreciated. This should be easy!!
Shane
I need to access the contextRoot or webapp name from a startup servlet deployed in WebLogic. I've tried the following;
getServletContext().getRealPath("/") return null.
getServletContext().getServerInfo() returns Weblogic 8.1 service pack 3...
getServletContext().getServletContextName() display the <display-name> value from my web.xml.
What I want is the <context-root> value in the EARs application.xml.
I tried the following JNDI lookup and the lookup failed but the error message contained the contextRoot.
String name = (String) jndiContext.lookup("java:/comp/env/namespace");
log.info("jndiContextlookup namespace = "+name);
Any help would be GREATLY appreciated. This should be easy!!
Shane