Henry Mok wrote: > > I have a question about using the applet. I want to have the applet > automatically load a file when it starts up. I see in your documentation > that that I can use argument0 to tell the applet what file to load. I've put > in the applet code the following. > > <param name="argument0" value="/home/hmok/chapterCERM02.xml"> > > This is the problem that I am having. When the applet loads, it put the url > in front of the file path. So it's looking in > http://192.168.1.24/home/hmok/chapterCERM02.xml and it gives an error > because the file isn't there. Is it possible to have the applet look on a > directory in the file system i.e. /home/hmok/xmlfile? >
The applet works as expected: a relative URL is resolved against the document base of the applet. In order to solve your problem, suffice to specify an *absolute* URL. In the above case, it is: file:/home/hmok/chapterCERM02.xml (file:///home/hmok/chapterCERM02.xml should work too.) > I tried putting the xml file into the directory of the web application so > that the url would be correct. This did work but it came up with a message > saying "Cannot save to this type of location...". > Note that such message wouldn't have been displayed if http://192.168.1.24 were a WebDAV server. > Can you tell me how to do this?

