[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Access Resources from webapp directory

Broots do-not-reply at jboss.com
Sat Aug 16 05:23:24 EDT 2008


Hi Peter,

Thank you for your response 
I've found myself another way to find the correct path :
I will try the solution in the application this afternoon.
Here is my possible solution :


  | ObjectName name = new ObjectName("jboss.system:service=MainDeployer");
  | Collection<DeploymentInfo> c = (Collection<DeploymentInfo>) server.invoke(name, "listDeployed", new Object[] {}, new String[] {});
  | for(Iterator<DeploymentInfo> i = c.iterator();i.hasNext();) {
  |     DeploymentInfo d = i.next();
  |     if (d.url.toString().endsWith("my-ear.ear")) {
  | 	String dir = d.localUrl.getPath();
  | 	File f = new File(dir  + "-contents");
  | 	if (f.exists()) {
  | 	   System.out.println("OK");
  | 	}
  |     }
  |     System.out.println(d.toString());
  | }
  | 			
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170902#4170902

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170902



More information about the jboss-user mailing list