Hi everybody,
This is really very serious problem for me. It is very common that a method takes file name as a
string and do some processing. I also made a method that does the same. But the problem is
when I run my program from main method it runs properly but When I run it on server (web environment) it throw FileNotFoundException because it searches file some where else (probably where the server is). I solved this problem with help of one of the ranchers (sorry, don't remember name!!), Now I am passing input stream to that method (did some modification in method) and I am preparing input stream from class loader (through getResourceAsStream() method), and its working fine in both the cases, because now it is searching file into folders that are in class path.
I hope I am clear till this point.
Now I have a written a method that validate XML against XSD:
It takes XML file correctly because I am passing input stream that I am taking it through class loader.... problem is with XSD. I have no control on XSD. I mean, it takes XSD file name from XML,
and searches XSD file from server folder (if I run program in web environment) and obviously not get XSD file and throw FileNotFoundException for XSD file. I am really confuse what should I do

.
I hope problem is clear...
If there is some way where I can pass input stream for XSD also, then my problem may be solve...
Any help is really greatful.
Thanks a lot.
[ August 02, 2005: Message edited by: rathi ji ]