Guys need a help with this.. Im trying to send these two values to another method implemented in a separate class. but it always catches "null" as the filename at the destination. how to catch the file name ???
Be you.. not someone else.. in everything you do..
I take it you're talking about "value" and "fileName"? Are you saying that within this piece of code they are not null, but in ServiceCaller they are null? That sounds unlikely. I think it more likely that they do no get assigned any values in this code.
My first guess would be that ServiceCaller should only be invoked once, after the for loop has been completed, instead of being called once in each iteration of the loop.
Ulf, as you told it seems to be no value is assigning for the fileName and value.. And the file doesn't upload to the given destination which is; File directory = new File(System.getProperty("catalina.base"),"conf") how to solve this? any help is much appreciated..
Joined: Mar 22, 2005
I can't tell from your response if the original problem is now solved after you have moved the ServiceCall invocation out of the loop...?
And the file doesn't upload to the given destination which is; File directory = new File(System.getProperty("catalina.base"),"conf")
Storing anything in one of Tomcat's directories is a bad idea; what if someone uploads a file called "server.xml"? Create a separate directory that is not used for anything else instead. But regardless, I don't see any code that would store anything anywhere...?
Ulf, you are absolutely right. The problem was within the ServiceCall class. The value it returns got the problem. I solved it. And thank you very much indeed for your support, it helped me a lot. Thanks a lot Mr. Marshal !