• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

ClassLoader with EJB

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using an XML and XSLT file to map/transform METADATA within an EJB. What I want to do is prevent the overkill of creating a web/database application just so I can access and read in my xml and xslt files into the EJB. My initial thought is to store the information under the META-INF directory for the ejb and access it some how.
I have tried the following:
this.getClass().getClassLoader().getResource("file:///META-INF/xml/NewTOInfo.xml");
This class is a utility class called by the MDB. This does not work and it returns a null;
Can someone with a little more experience than I explain how I can go about doing this?
Thanks in advance.....
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remove the file protocol.
[ September 24, 2003: Message edited by: Pradeep Bhat ]
 
Russ Ray
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you VERY much! That got me started! Administrator, you may close this topic!
Russ
[ September 24, 2003: Message edited by: Russ Ray ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic