on 04-04-2005 10:13 AM
Hello,
I have an xml file which is sitting at this location:
main-uni1\c$\Companies\OutGoing\MonyReports\test.xml
My question is how can I create new File which will contain this xml file for parsing? The File constructor doesn't receive these notations.
Hi Roy,
Try to map the folder
main-uni1\c$ under a network drive T for example and then use
new File("T:\Companies\OutGoing\MonyReports\test.xml")
Hope that helps,
Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I tried the following
try{
File f=new File("
"+"
<remote system name>
c#
test.txt");
int size=(int)f.length();
System.out.println(""+size);
}catch(Exception e){
System.out.println(e.toString());
}
I recieved a 0 with the web dynpro while i recieved the file size using simple java code.
I also tried writing something into the file in web dynpro and recievd a fileNotfound exception due to unknown username or bad password.
Check out the code and do let me know about the result
Regards
Shyam R
I think the problem is because of the login credentials required for logging into the remote system, which the server does not have. So i think discussing the issue in dynpro forum would be better, might be the WD gurus can help.
Web dynpro does not support whole of the java functionalities.
I just wanted you to try the code I have given, in your dynpro, and know what the result was.
Try printing the size.
The File.length() method returns "The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist" - and the reason for the latter could be exactly "Logon failure: unknown user name or bad password". What actually was my first guess that the server user doesn't have access to the network folder.
Best regards,
Vladimir
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.