Henry Mok wrote: > I tried putting in > > <param name="argument0" > value="file:///home/hmok/ACMwebjects/out/chapterCERM02.xml"> > > But when the applet load it errors saying that it cannot load > C:\home\hmok... I am not on a windows machine so how can I have it load > /home/hmok/ACMwebjects/out/chapterCERM02.xml? >
--> The applet runs in a Web browser which itself runs on *your* machine. The applet does not run not on the HTTP server from which the applet code is downloaded. Therefore: <param name="argument0" value="file:///home/hmok/ACMwebjects/out/chapterCERM02.xml"> (Note the absolute URL. Starts with "file:/".) specifies a file called /home/hmok/ACMwebjects/out/chapterCERM02.xml found on your machine, not on the HTTP server. --> Now let's suppose that your HTTP server is http://www.acme.com/ and that the HTML page referencing the applet is found in http://www.acme.com/xxe_applet/index.html. <param name="argument0" value="../../home/hmok/ACMwebjects/out/chapterCERM02.xml"> (Note the relative URL. Does not start with "file:/".) specifies a relative URL which is thus resolved against the document base of the applet: http://www.acme.com/xxe_applet/index.html. Therefore, this instructs the XXE applet to open something like: http://www.acme.com/home/hmok/ACMwebjects/out/chapterCERM02.xml This will succeed, but unless http://www.acme.com/ is WebDAV enabled and you have included the WebDAV plug-in in the applet deployment, you'll not be able to save the opened document to this http:// location. --> We have tested what's described above many times and it works fine. The only pitfall is that Web browsers tend to cache http://www.acme.com/xxe_applet/index.html. Therefore if you modify such HTML page, for example, to specify a different argument0, make sure that your Web browser actually loads the up-to-date file.

