File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    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