File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes SCEA 5/1 - Applet question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "SCEA 5/1 - Applet question" Watch "SCEA 5/1 - Applet question" New topic

SCEA 5/1 - Applet question

Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
Is an applet (from a untrusted jar file) allowed to access LOCAL and REMOTE printers ?


SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11777


Please check your private messages for an important administrative matter.

Thanks, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968

An applet will run in a security sandbox that will only allow it to communicate back to the server from which it was downloaded, so local printers are out of the question.

Users can configure custom security settings for applets, but for the SCEA exam, you're probably talking about the security sandbox on most questions.

-Cameron McKenzie
Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290 this case you meant that LOCAL printers can be accessed by applets normally , right ?

and with regards to remote printers, in this case, if it's different from the original source server it then won't be allowed!!

that's correct?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
If by "normally" you mean that the applet needs to be signed or the local security policy altered, then yes.

I would guess that the applet also needs to be signed in order to print on a printer connected to the host where the applet was served from (if it can even connect to it).
Selina Tan
Ranch Hand

Joined: Apr 29, 2008
Posts: 30
Go to the end of the page of Sun's Applet security for a summary of applet's capability
[ May 06, 2008: Message edited by: Selina Tan ]
Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
Very nice page Selina, but found nothing about printing.

I agree. Here's the link:
subject: SCEA 5/1 - Applet question
It's not a secret anymore!