problem faced while writing into logs using applet


Web tier: servlets, JSP, Web frameworks: problem faced while writing into logs using applet

  1. problem faced while writing into logs using applet (1 messages)

    Hi, I am facing a problem when i use logs(log4j) in the application. With the applet i am accessing the servlet which has logs. when i try to open the applet i am getting this error. java.lang.ExceptionInInitializerError at elsevier.xpharm.toc.admin.SaveManager.(Unknown Source) at elsevier.xpharm.toc.admin.TocAdminApplet.init(Unknown Source) at Source) at Source) Caused by: access denied ( xpharm_log.txt write) at Source) at Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkWrite(Unknown Source) at Source) at Source) at Source) at org.apache.log4j.FileAppender.setFile( at org.apache.log4j.FileAppender.activateOptions( at org.apache.log4j.config.PropertySetter.activate( at org.apache.log4j.config.PropertySetter.setProperties( 123) at org.apache.log4j.config.PropertySetter.setProperties( 87) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator. java:637) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator. java:595) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfi at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.ja va:410) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.ja va:436) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConvert at org.apache.log4j.Category.( ... 4 more can any one help me out from this issue Regards, G.R.Reddy
  2. Applets (Unsigned) run in a security sandbox at the client. The sandbox forbids access to the file system (amongst several restrictions). You cannot therefore log to a file. You either have to stream your log to System.out (where it will appear in the java plugin console output), or sign your applet using a security cerificate, giving it IO access. Regards N