Solved

load any sites page from applet

Posted on 2002-04-18
8
142 Views
Last Modified: 2010-03-31
Can we load any sites page from applet?

I have my applet on selecting any url from combo box eg www.google.com 
it should display the page in same browser
It should also be able to open the same on particular Ip address.



Thanx
AJ
0
Comment
Question by:j007
8 Comments
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 6952556
By default an applet does not have permission to do what you want. It is only allowed to connect to the site that it was loaded from.

You must get the user to grant the applet additional permissions if you with to connect to other sites.

You could of course simply display the page in another browser window, instead of having the applet display it:

applet.getAppletContext().showDocument(url, "target");
0
 

Author Comment

by:j007
ID: 6952624
I want to show the url on the same applet window as I want to trap the mouse event too.

What permissions are to be granted for connecting to other sites?


Thanx in Advance
Aj
0
 
LVL 92

Expert Comment

by:objects
ID: 6952635
I think its SocketPermission.
So do you want the page to display within the applet, or outside the applet?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:j007
ID: 6952864
I want this page to be displayed inside the applet
0
 
LVL 92

Expert Comment

by:objects
ID: 6952879
Then you'll need to get the necessary priveliges from the user either by signing the applet and requesting them from the user, or changing their policy file.
0
 
LVL 12

Expert Comment

by:ahosang
ID: 6953891
getAppletContext().showDocument(url)
should work if called from within the applet.
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7972386
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by: objects
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8021347
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question