Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassLoader with EJB

 
Russ Ray
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • 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.....
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic