DelphiFAQ Home Search:

How do you open a URL from an applet?


comments1 comments. Current rating: 5 stars (1 votes). Leave comments and/ or rate it.


How do you open a URL from an applet?


By using the method showDocument(URL) see the example below. This code will load the file test.html from the same directory where the applet is situated on the server and if the file is not found display error message on the status bar.

URL url = getCodeBase(); // get url of the applet

try {
  getAppletContext().showDocument (new URL(url+"test.html"));
 catch(MalformedURLException e) {
  showStatus("URL not found");

Content-type: text/html


2006-11-13, 21:29:46 from India  
The above result was very useful to me.And I would like to get J2ee FAQs to develop my J2ee knowledge.



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: