Skip to Main Content

need help with passing URL of document into Applet

797160Feb 15 2011 — edited Feb 15 2011
I have an applet, which is called by the file
file:///home/lyle/Desktop/linkit/hello.html

I am trying to access the URL of this file in my applet. So I tried the line
String completeURL = getDocumentBase().toString();

However, it is not returning the correct value - it returns the path, but not the filename (ie, not the whole URL)

To debug it, I added this line:
answers.append("url = " + completeURL + "\n");

Which returned the value
url = file:/home/lyle/Desktop/linkit/

Can anyone tell me why this is not returning the entire line?
Thanks!

Edited by: lkb3 on Feb 14, 2011 9:40 PM - fixed a typo
Comments
Post Details
Added on Feb 15 2011
3 comments
52 views