Solved

Applet-Servlet not on the same server.

Posted on 2001-07-05
2
284 Views
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,

Llaurick
0
Comment
Question by:llaurick
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
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 java.net.SocketPermission "156.65.127.45", "accept, connect, listen, resolve";
};

You will specify this policy file in the Java appletviewer command.
appletviewer -J-Djava.security.policy=java.policy 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:
http://java.sun.com/docs/books/tutorial/security1.2/sigcert/index.html

I will try to post some sample programs soon.

Good luck!
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
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.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
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.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
login jsp example 24 104
Java syntax, or is it Selenium 6 60
junit example issue 2 54
Bitwise and to sum elements 2 52
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

732 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