my dog learned polymorphism*
The moose likes Websphere and the fly likes where to put xml file so it gets built in ear Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "where to put xml file so it gets built in ear" Watch "where to put xml file so it gets built in ear" New topic
Author

where to put xml file so it gets built in ear

david lightman
Ranch Hand

Joined: Nov 03, 2004
Posts: 82
ok this seems like a simple question ,but here goes..

basicalli I have a session bean that uses a pojo utility class that simply reads in an XML file using document builder like:

Document doc = new docBuilder.parse(new File("C:/myfile.xml"));

and works perfectly.

But I do not want it to be external to the EAR and read from my hard drive, I want to put in inside and built from with the EAR.

how do i go about acheiving this? what dir do i put the xml file so it gets found..

thanks
[ February 12, 2006: Message edited by: david lightman ]
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

This question gets asked about once a month, so I refer you to last months post:

http://www.coderanch.com/t/77455/Websphere/Loading-properties-file-external-EAR


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: where to put xml file so it gets built in ear
 
Similar Threads
using xml to configure an application server
setting up Log4J in Orion webapps
Velocity to xml and validate with xsd
Default code formatter in eclipse
reading an xml file in the web services java file