cancel
Showing results for 
Search instead for 
Did you mean: 

Problem getting a remote file using Wen DynPro

Former Member
0 Kudos

Hello,

I am trying to use the File constructor in order to create new File(). The file is located on a drive which is mapped to the server.

The problem is that when I do it using regular Java application deployed on the server it is working but when I do it through Web DynPro application I receive FileNotFoundException: "The system cannot locate the specified file". At the Java forum I was told that the problem is because of the login credentials required for logging into the remote system, which the server does not have and that Web dynpro does not support whole of the java functionalities.

Is this True? If yes, than how can I solve this issue?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

While crating the virtual directory instead of selecting the mapped drive just type the path in the input field of the Vitualdirectory creation wizard.

Regards, Anilkumar

Former Member
0 Kudos

Hello again,

Your solution works and I appriciate the help very much!

But, why creating a workaround when we see that the problem is with the server/mapping. If the IIS can't find the file, I don't expect DynPro to find it... The question is what makes this happen?

0 Kudos

Hi,

I am able to access a file from a remote machine when running a class file in the Java Perspective, but when I deploy it in the server by using a .war->.ear file accessing it through a JSP. It does not retrieve the file.

Why is it that when we run it from the client it works and fails when it run from the server?

Former Member
0 Kudos

Hi,

Still you can do

Ex:

URL MyURL= new URL("URL");

MyURL.openStream() will give InputStream where you can pass this InputStream to your DOM parser.

Regards, Anilkumar

Former Member
0 Kudos

and what about the second problem that the IIS doesn't allow me to create a virtual directory on a mapped drive?

Former Member
0 Kudos

That's strange, even when I try to create new Web site or Virtual directory from a file and I go to this file the IIS can't find it! So the problem is not with the DynPro is with the Server... But what is it?

Former Member
0 Kudos

Hi ,

One way of aceessing the file is make the files you want HTTP enabled using IIS.

Ex: If you want to access file XYZ.txt then make it http enabled using Internet Information services aso that you can access the file as http://machinename:port/File.txt

Now you can use URL ( java.net.URL) to open the file and reading.

Regards, Anilkumar

Message was edited by: Anilkumar Vippagunta

Former Member
0 Kudos

Yes but I am using DOM parser and it expects to receive a File not a URL...

And even so, the IIS doesn't allow me to create a virtual directory on a mapped drive.