From: Greg T. <gturner@Tiburon-E-Systems.com> - 2002-08-30 20:16:12
|
You are getting null, probably because the xml file is not in the class path The way I do it is this: InputStream fi = getClass().getSystemResourceAsStream (xmlFile) ; To make this work, I package the xml file in the same place as the *.class file. Saroj Kumar wrote: > Hi All, > > I have got a XML which defines some constants which are read by my > Session Bean while serving some requests. Reading is done in a helper > class. I am unable to read this XML file. > > I use : > > > InputStream fi = ClassLoader.getSystemResourceAsStream(xmlFile) ; > > I am getting fi as NULL. > > InputStreamReader isr = new InputStreamReader(fi); > > > InputSource is = new InputSource(isr); > > > DOMParser parser = new DOMParser(); > > parser.parse(is) > > Any help would be great; > > SAROJ > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > JBoss-user mailing list > JBo...@li... > https://lists.sourceforge.net/lists/listinfo/jboss-user -- Greg Turner, JBoss Authorized Consultant Tiburon Enterprise Systems http://www.tiburon-e-systems.com Box 1171 Tiburon, CA 94920 415-332-3363 |