Ler URL no Applet

1 resposta
Z

Pessoal boa tarde, tenho um aplicativo em Applet e preciso identificar a URL que o mesmo está rodando, alguem sabe como posso obter essa URL :?:

Agradeço pela atenção :!:

Sergio Zenatti :!:

1 Resposta

T

Veja qual das duas é a que você quer.


URL getCodeBase()
Gets the base URL. This is the URL of the directory which contains this applet.


URL getDocumentBase()

Gets the URL of the document in which this applet is embedded. For example, suppose an applet is contained within the document:

http://java.sun.com/products/jdk/1.2/index.html


The document base is:

http://java.sun.com/products/jdk/1.2/index.html


Returns:
    the URL of the document that contains this applet.
Criado 13 de maio de 2005
Ultima resposta 13 de mai. de 2005
Respostas 1
Participantes 2