The intention is to use an Applet which call's servlets to read and update
data on our AS400.  I call the Applet through an HTML-page.  In the
statusbar of explorer I can see that classes used by the Applet are loaded,
however it is so fast I can't read them all.  At a certain point I get an
error that this Applet can't be instantiated.  Do you know if a log exists
where one can see which classes are loaded ?
Here's is the Applet-method which call's the servlet and returns the data I
need :

public TimeSheetScreenData sendPostMessage(Serializable obj) throws
java.io.IOException
{
     try
     {
          URL url = new URL(getCodeBase
(),"/servlet/timesheets.STimeSheetController");
          URLConnection con = url.openConnection();

          // Prepare for both input and output
          con.setDoInput(true);
          con.setDoOutput(true);

          // Turn off caching
          con.setUseCaches(false);

          // Set the content type to be java-internal/classname
          con.setRequestProperty("Content-Type", "java-internal/" +
obj.getClass().getName());

          // Write the serialized object as post data
          ObjectOutputStream out = new
ObjectOutputStream(con.getOutputStream());
          out.writeObject(obj);
          out.flush();
          out.close();

          // Read the response
          ObjectInputStream in = new ObjectInputStream(con.getInputStream
());
          return (TimeSheetScreenData)in.readObject();
     }
     catch (Exception e)
     {
          e.printStackTrace();
     }
     return null;
}

 Because of security-related problems, we try to combine a
 APPLET-SERVLET combination to run a little AS400-application.  I
 created the java-applet and servlet in VAJAVA (WDT400) where no errors
 exists anymore.  I can run the applet from within VAJAVA, although
 only till the servlet needs to be loaded. (question 1)

 1) How do I test this within VAJAVA.  I can start the servletengine
 but don't know what to do next....

 2) I moved all files to the WebServer and tried to load the applet
 from the WebServer.  Following error is shown in java-console :

 com.ms.security.SecurityExceptionEx[timesheets/ATimeSheets.<init>]:
 java.io.IOException: bad path: C:\WINNT\Java\lib\swing.properties
         at com/ms/security/permissions/FileIOPermission.check
         at com/ms/security/PolicyEngine.deepCheck
         at com/ms/security/PolicyEngine.checkPermission
         at com/ms/security/StandardSecurityManager.chk
         at com/ms/security/StandardSecurityManager.checkRead
         at java/io/FileInputStream.<init>
         at java/io/FileInputStream.<init>
         at javax/swing/UIManager$3.run
         at javax/swing/SwingUtilities.doPrivileged
         at javax/swing/UIManager.loadSwingProperties
         at javax/swing/UIManager.initialize
         at javax/swing/UIManager.maybeInitialize
         at javax/swing/UIManager.getUI
         at javax/swing/JPanel.updateUI
         at javax/swing/JPanel.<init>
         at javax/swing/JPanel.<init>
         at javax/swing/JRootPane.createGlassPane
         at javax/swing/JRootPane.<init>
         at javax/swing/JApplet.createRootPane
         at javax/swing/JApplet.<init>
         at timesheets/ATimeSheets.<init>
         at com/ms/applet/BrowserAppletFrame.newInstance
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.run
         at java/lang/Thread.run
 java.lang.InstantiationException: timesheets/ATimeSheets
         at com/ms/applet/BrowserAppletFrame.newInstance
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.run
         at java/lang/Thread.run

 I'm pretty sure the classes are in the correct folders, however the file
swing.properties does not exist !

 any help welcome...



_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to