Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / April 2004

Tip: Looking for answers? Try searching our database.

JRE 1.4 Policy File

Thread view: 
Jason Price - 20 Apr 2004 16:40 GMT
I've been looking everywhere but can't find a solution to this:

I have an applet that prints to a barcode printer.  Unfortunately as
this applet is served from a silverstream (ver 3.7.5) server I can't
just use a jar file and sign it (because silverstream just will not
server the jar file correctly).  The applet will run on an intranet
only but I can only get it to work but setting the ploicy file to
AllPermissions.  I am a bit loath to do this and would much prefer
just to set Printing permisions in the policy file.  Does anyone have
any idea what permissions i would need? or indeed if it is possible?
i am running JRE 1.4.2_04 on the clients.
Roedy Green - 21 Apr 2004 00:38 GMT
>Does anyone have
>any idea what permissions i would need?

Sun has a giant list of all permissions you can comb.  See the link
at http://mindprod.com/jgloss/policyfile.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Jason Price - 21 Apr 2004 09:22 GMT
>  Sun has a giant list of all permissions you can comb.  See the link
> at http://mindprod.com/jgloss/policyfile.html

I've looked through these docs but there is no mention of the
permissions needed for any class in the Javax.print package.  Its not
a major problem (as its my applet running on my intranet), its just I
may need to do this for our web site at some point in the future and
thought i'd try and figure it out before hand.

Thanks for you reply.
Roedy Green - 21 Apr 2004 10:04 GMT
>I've looked through these docs but there is no mention of the
>permissions needed for any class in the Javax.print package.

Are you getting an exception that mentions a failed permission?

Is the problem in the URL area?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Jason Price - 22 Apr 2004 14:58 GMT
> Are you getting an exception that mentions a failed permission?
>
> Is the problem in the URL area?

I don't get any exceptions.  The java plugin throws up an alert saying
this applet is trying to print do you want to allowit? with Yes/No
buttons. If you click yes the applet carries on executing but
PrintServiceLookup.lookupPrintServices(null, null) always returns a
zero length array. If I set a policy file with AllPermissions then it
all works as it should. As you say it may be somthing to do with url
or maybe sockets as the javax.print package is IP compatible.  I don't
have the time to do any testing this week but I'll post anything I
find when I can run some tests.

cheers


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.