Applet-Servlet not on the same server.

Posted on 2001-07-05
Last Modified: 2013-11-24
Is there a way to allow an Applet to call a Servlet which is not on the same server as the Applet by modifying some policy files? (or otherwise)

Thanks in advance,

Question by:llaurick

Accepted Solution

sghosh092199 earned 200 total points
ID: 6257269
Basic applets are allowed to connect only to their originating host. It is possible to allow an Applet to call a Servlet on another machine by making changes to the policy file. The policy file java.policy would look like this:

grant {
  permission "", "accept, connect, listen, resolve";

You will specify this policy file in the Java appletviewer command.
appletviewer Applet.html

The limitation with this approach is obvious. It can only be used in conjuction with the appletviewer command. So, better options will be Digital Signatures and Certificates.

You can find good help here:

I will try to post some sample programs soon.

Good luck!
LVL 14

Expert Comment

ID: 8975005

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:

-- points to sghosh

Please leave any comments here within the next seven days.
EE Cleanup Volunteer
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
diffSum example 4 51
type mismatch (Object[] to double[] 4 33
Chrome and Firefox Java 5 51
JAVA API design with micro service cloud in mind 1 47
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

828 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