Accessing an XML file from webstart

We want to launch an application hosted on a web server on client machines using web start. The application uses data from an xml file which is present as a separate file on the webserver.Right now,the application is starting off but we can see that the application is not accessing the XML file.

This is the exeption output at the console

java.io.FileNotFoundException:

1)Is this possible at all?will the application be allowed to access any other file on the server?

a)All the jar files in the Application have been signed and the tag<all-permissions> has been included.

2)We have tried passing the XML file by using the argument tag in the jnlp file also. The statement used was <argument>nameoffile.xml</argument>

3)We also have a copy of the XML file in the jar file containing the class which uses this XML file.Even this doesnt seem to help

Hope to get some help as soon as possible.Thanks in Advance.

[975 byte] By [varun_s_murthya] at [2007-11-26 14:31:15]
# 1

The application is running on the client machine while the xml file is on the server.

You would have to open a urlconnection to the file on the server to read it from there.

To read the contents of the copyin the jar file you can just use:

Thread.currentThread().getContextClassLoader().getResourceAsStream("nameoffile.xml");

but you still can't access it as a file since it isn't one.

/Andy

dietz333a at 2007-7-8 2:26:17 > top of Java-index,Desktop,Deploying...