[jboss-user] [Beginners Corner] - Re: reading a file stored outside the .war

sdein do-not-reply at jboss.com
Thu Aug 20 05:41:33 EDT 2009

what we did was to use the "properties mbean service" from the link together with an input stream opened via an url. this seemed like the most future-proof way of setting this up (web-service and asset-storage are completely decoupled from each other):


  |   <mbean code="org.jboss.varia.property.SystemPropertiesService" 
  |     name="jboss:type=Service,name=SystemProperties">  
  |     <attribute name="Properties">  
  |       AssetPath=file:///g|projects/ourProject/assets/test.txt
  |     </attribute>  
  |   </mbean>
  | </server> 

and in the servlet:

String path = System.getProperty("AssetPath");
  | URL url = new URL(path);
  | InputStream is = url.openStream();

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

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

More information about the jboss-user mailing list