🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages Started by Hiroshi Fri, 23 Dec 2005 11:30
Applet and printing
#77
Author: Hiroshi
Date: Fri, 23 Dec 2005 11:30
25 lines
2830 bytes
Hi everyone, I'd like to confirm my conclusion from a long and arduous experience.

"Applets cannot print even setting 'File Permission' in a policy file that resides in a local system."

Sun provides tutorial for us. One of them is dedicated to this 'applet and resource restriction' issue in

http://java.sun.com/docs/books/tutorial/security1.2/tour1

At its start, it says "...It shows how resource accesses, such as reading or writing a file, are not permitted for applets unless explicitly allowed by a permission in a policy file."

In the following web pages (many of them), there is NO instance of using word 'printing'. So this tutorial seems not to be meant for printing, ie the word 'resouce' here does not include printing (although it doesn't make a sense to me, but...)

Following the step-by-step instructions, the statement in the start page was indeed the case; by adding a policy file to "java.security" file (which web browsers and appletviewer refer), we can make an applet access named files for the specified access.

In the policy, there are many 'permissions' from AudioPermission to SSLPermission, one of them is FilePermission. My experience with the tutorial confirms that FilePermission is applicable to file I/O, but not printing.

I find it so weird that the policy does not include printing.

Some contributors to Sun's Java forum say that applets must be certified to be able to print while some few contributors say otherwise ie no need to certify.

Could anyone give web addresses where I can find out detail and definite description about this issue - applet and PRINTING?
(What I read and found about the issue is alway, always merkey about it. Some of them even list 'display' to be permitted its access. (What 'display'? It can't be monitors because without monitor access, what can an applet do? Playing music without revealing itself?) They use word 'resource' or 'device'. So files are resources and printers and modems are devices. Resources are under the policy, then what are devices under?

Your response is greatly appreciated.
Re: Applet and printing
#78
Author: Paul Nichols (TeamB)
Date: Mon, 26 Dec 2005 06:17
27 lines
2008 bytes
Hiroshi wrote:

> 
> Hi everyone, I'd like to confirm my conclusion from a long and arduous
> experience.
> 
> "Applets cannot print even setting 'File Permission' in a policy file that
> resides in a local system."
> 
> Sun provides tutorial for us. One of them is dedicated to this 'applet and
> resource restriction' issue in
> 
> http://java.sun.com/docs/books/tutorial/security1.2/tour1
> 
To use print operations from an applet, your bezt bet would be to code sign
the applet. While true you could make a policy file to allow this
operations, you would need everyone to include this policy file manually,
or you would need to code sign an applet to allow write permissions on the
local machine. It would be much easier to code sign the applet from the get
go and then you can perform any normally unsafe operation. Of course the
user would still have to agree to accept the applet and its certificate at
least for the first time.


A simple search revealed the following article:

http://www.developer.com/java/article.php/601671
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads