Java cgi applet not working

Hi guys,
I have an applet that allows a user to "create" a datafile using buttons, to ensure consistency of input. I then want to write this file tto my webserver (it keeps the data for a soccer league, with basic stats). I know that applets can't write in theory, so I have tried to do it using the POST function, to a basic CGI programme. I am getting an error
HTTP/1.1 502 Gateway Error
Server: Microsoft-IIS/5.0
Date: Tue, 15 Apr 2003 18:07:32 GMT
Connection: close
Content-Length: 186
Content-Type: text/html
<head><title>CGI Application Timeout</title></head><body><h1>CGI Timeout</h1>The specified CGI application exceeded the allowed time for processing. The server has deleted the process.Data file sent to host
I know this is a java forum, but the CGI is simple
print "content-type: text/plain\n\n";
open(OUT,"> /Under14/111111.TST");
while(<>){
     print OUT $_;
     print $_;
close(OUT);
exit 0;I have no idea how to debug this particular error, searching the internet brings out hundreds of similar errors, but little explanation of what is going wrong
The Java code that kicks this off is
//============================================================================//     
     public void SendData(String data) throws Exception {
          tArea1.append("\n\n************   Sending Data   ************\n");
          URL url = new URL("http","www.lagfc.co.uk","/cgi-bin/ResUpd.cgi");
          URLConnection ucon = url.openConnection();
          ucon.setDoOutput(true);
          ucon.setDoInput(true);
          ucon.setUseCaches(false);
          ucon.setRequestProperty("Content-type", "text/plain");
          ucon.setRequestProperty("Content-length", 750+"");
          PrintStream out = new PrintStream(ucon.getOutputStream());
          out.print(data);
          out.flush();
          out.close();
          DataInputStream in = new DataInputStream(ucon.getInputStream());
          String s;
          while((s=in.readLine()) !=null){
          tArea1.append(s);
          in.close();
          tArea1.append("\n\nData file sent to host");
   } // end of sendData
//============================================================================//Help..........................

Sscotties : I do appreciate your help, and maybe I have got wood for trees syndrome. I have been trying to understand what is going wrong here. I started learning Java 2 weeks ago, it seemed a good idea at the time, and a way to combine helping out my daughters football team, with a desire to understand more.
I do not have a programming background, and so some of what you have been trying to tell me, will have gone right over my head, and I won't know which bits! I didn't understand the implications of what you were asking me to do last night, but having thought it through with a cooler head, I thank you for the login code. It is a good way to stop unauthorised users screwing up my results file. (at least if they only have my level of knowledge!), and as such I will incorporate it into the finished product.
My frustration is down to the fact that I really have little understanding of what I am doing at this point, and I have no idea how to tackle the problem. Before I post onto this board, I normally do a Google trawl through many pages of data in an effort to try and find the answers myself, it helps with the general understanding of how things work, and is very satisfying when I can fix the problems. I know for example, that java is not the platform independant language I thought it was two weeks ago. Most of my users use basic IE, and so when I test something out, I have to test it using plain IE, then IE with 1.4.1
then Netscape. This slows things down tremendously, as things like TextArea attributes work differently between MS and 1.4.1. I can work on a simple problem for hours, to find that its just MS doing there own thing. A great tip I got the other day was to compile using -target 1.1. This has increased my speed of development ten fold (now at 8mph!)
My apologies for being tetchy, its nothing a few beers and a spell away from the PC won't cure.
Back to the problem in hand. I made all the changes you suggested. The changes to perl make no difference, the error message is the same. I have left your suggestions to use getCodeBase().getHost() in, as they make the applet more portable, and I thank you for that.
The DataInputStream is deprecated, but as I am using -target 1.1 will this be a problem (Could be Newbie stupid question time! :-{)) I have used this format in other parts of the code as well. I am also using action rather than ActionEvent to listen for events in the prog. This is the only other deprecated method in the coding.
I don't know how to set permissions on the server, but will ask the question of my hosting company. I have a pick up and run cgi script that does the guest book, and this worked no problem, writing records to a guestdata file, and a password file, with no further changes needed to the file permissions, but still worth checking.
I am sending the data, because the data is returned to me, before the error message, although not all the data sent has been returned as part of the error message, are there any restrictions on the size of a String, the file is 9250 bytes long, does it need terminating with an EOF marker of some sort ?
Any advice will be gratefully accepted
regards
KPJ

Similar Messages

  • Java applet not working savevid keepvid

    Hi all,
    I'm sure I'm not the only one who has been confounded by Java applets not working in certain download web services; in my case, keepvid.com and savevid.com to download copies of youtube videos.  It has been a huge headache and even debilitating in my case.  I teach film and video to middle schoolers, and we often use youtube as a resource for our class projects. 
    I found a solution today, I think, and wanted to share it:
    I installed the browser called "Torch" and it seems to work fine, so far.

    thanx 4 replying
    using the browser to view Applet is not recomended that is because if u change the the source-code and recompile the applet then run it using the broswer it will run the old-version
    Also i've found the solution here
    http://www.cs.utah.edu/classes/cs1021/notes/lecture03/eclipse_help.html

  • Installing Java 7 from Oracle just made Applets not work, how to fix

    Mac 10.7.4. I tried installing Java 7 from Oracle, but all it did was remove half the prefs from Java and make Applets not work. How do I revert/reinstall Java?

    Here you go!
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Java Gridbag Layout Not Working

    Hi,
    I have a java sound applet that works, with buttons and icons and combo boxes. I have just added a label and I want the label to appear beneath the buttons and combo boxes, so I decided that Gribag is the best way of achieving this. However, I have set all the co-ordinates to the right places, and suddenly, everything is in the center in one line. Here is the code:
    import javax.swing.*;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class SoundApplet extends JApplet
                             implements ActionListener,
                                        ItemListener {
        AppletSoundList soundList;
        String auFile = "spacemusic.au";
        String aiffFile = "flute+hrn+mrmba.aif";
        String midiFile = "trippygaia1.mid";
        String wavFile = "monkwebstune.wav";
        String chosenFile;
        AudioClip onceClip, loopClip;
        JComboBox formats;
        JButton playButton, loopButton, stopButton;
        boolean looping = false;
        public void init() {
            String [] fileTypes = {auFile,
                                   aiffFile,
                                   midiFile,       
                                   wavFile,};
            Container contentArea = getContentPane();
            contentArea.setBackground(Color.black);
            GridBagLayout flowManager = new GridBagLayout();
            GridBagConstraints pos = new GridBagConstraints();
            contentArea.setLayout (flowManager);
            formats = new JComboBox(fileTypes);
            formats.setSelectedIndex(0);
            chosenFile = (String)formats.getSelectedItem();
            formats.addItemListener(this);
            formats.setBackground(Color.blue);
            formats.setForeground(Color.white);
            pos.gridx = 1; pos.gridy = 1;
            contentArea.add(formats, pos);
            Image playImage = getImage( getCodeBase () , "play.gif" );
            ImageIcon playIcon = new ImageIcon( playImage );
            playButton = new JButton("Play", playIcon);
            playButton.addActionListener(this);
            playButton.setBackground(Color.green);
            playButton.setForeground(Color.black);
            pos.gridx = 1; pos.gridy = 1;
            contentArea.add(playButton, pos);
            Image loopImage = getImage( getCodeBase () , "loop.gif" );
            ImageIcon loopIcon = new ImageIcon( loopImage );
            loopButton = new JButton("Loop", loopIcon);
            loopButton.addActionListener(this);
            loopButton.setBackground(Color.yellow);
            loopButton.setForeground(Color.black);
            pos.gridx = 2; pos.gridy = 1;
            contentArea.add(loopButton, pos);
            Image stopImage = getImage( getCodeBase () , "stop.gif" );
            ImageIcon stopIcon = new ImageIcon( stopImage );
            stopButton = new JButton("Stop", stopIcon);
            stopButton.addActionListener(this);
            stopButton.setEnabled(false);
            stopButton.setBackground(Color.red);
            stopButton.setForeground(Color.black);
            pos.gridx = 3; pos.gridy = 1;
            contentArea.add(stopButton, pos);
            JLabel Occult = new JLabel ("Occult");
            pos.gridx = 2; pos.gridy = 3;
            contentArea.add(Occult, pos);
            setContentPane(contentArea);
            JPanel controlPanel = new JPanel();
            controlPanel.add(formats);
            controlPanel.add(playButton);
            controlPanel.add(loopButton);
            controlPanel.add(stopButton);
            controlPanel.add(Occult);
            getContentPane().add(controlPanel);
            controlPanel.setBackground(Color.black);
            setContentPane(contentArea);
            startLoadingSounds();  
        public void itemStateChanged(ItemEvent e) {
            chosenFile = (String)formats.getSelectedItem();
            soundList.startLoading(chosenFile);
        void startLoadingSounds() {
            //Start asynchronous sound loading.
            soundList = new AppletSoundList(this, getCodeBase());
            soundList.startLoading(auFile);
            soundList.startLoading(aiffFile);
            soundList.startLoading(midiFile);
            soundList.startLoading(wavFile);
        public void stop() {
            onceClip.stop();        //Cut short the one-time sound.
            if (looping) {
                loopClip.stop();    //Stop the sound loop.
        public void start() {
            if (looping) {
                loopClip.loop();    //Restart the sound loop.
        public void actionPerformed(ActionEvent event) {
            //PLAY BUTTON
            Object source = event.getSource();
            if (source == playButton) {
                //Try to get the AudioClip.
                onceClip = soundList.getClip(chosenFile);
                onceClip.play();     //Play it once.
                stopButton.setEnabled(true);
                showStatus("Playing sound " + chosenFile + ".");
                if (onceClip == null) {
                    showStatus("Sound " + chosenFile + " not loaded yet.");
                return;
            //START LOOP BUTTON
            if (source == loopButton) {
                loopClip = soundList.getClip(chosenFile);
                looping = true;
                loopClip.loop();     //Start the sound loop.
                loopButton.setEnabled(false); //Disable loop button.
                stopButton.setEnabled(true);
                showStatus("Playing sound " + chosenFile + " continuously.");
                if (loopClip == null) {
                    showStatus("Sound " + chosenFile + " not loaded yet.");
                return;
            //STOP LOOP BUTTON
            if (source == stopButton) {
                if (looping) {
                    looping = false;
                    loopClip.stop();    //Stop the sound loop.
                    loopButton.setEnabled(true); //Enable start button.
                else if (onceClip != null) {
                    onceClip.stop();
                stopButton.setEnabled(false);
                showStatus("Stopped playing " + chosenFile + ".");
                return;
    }How can I get everything to follow the co-ordinates I specified?
    Thanks in advance.

    try setting a weightx or weighty with a non-zero number between 0 and 1.
    constraint.weightx = 0.5;

  • Java script is not working in custom tabular form

    hai all,
    i have changed my built in tabular form to custom tabular form.my java script is coding working fine in built in tabular form . But in my custom tabular form java script is not working ,since it is created as standard report(Display As).
    pls help me.
    with thanks and regards
    sivakumar.G

    Is the appostrophe function test(pthis) *'* present in your javascript code...
    If not can you post the same in apex.oracle.com and give the credential so that I can the why its not wroking
    Regards,
    Shijesh

  • Java command still not working - please help

    i have installed jdk1.6.0_05. The javac command works fine but the java command does not work at all. even when i try java HelloWorld i receive this exception message
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    Caused by: java.lang.ClassNotFoundException: HelloWorld
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    please help (you to SUN)!!

    bart@kerberos:~$ javac -help
    Usage: javac <options> <source files>
    where possible options include:
      -g                         Generate all debugging info
      -g:none                    Generate no debugging info
      -g:{lines,vars,source}     Generate only some debugging info
      -nowarn                    Generate no warnings
      -verbose                   Output messages about what the compiler is doing
      -deprecation               Output source locations where deprecated APIs are used
      -classpath <path>          Specify where to find user class files and annotation processors
      -cp <path>                 Specify where to find user class files and annotation processors
      -sourcepath <path>         Specify where to find input source files
      -bootclasspath <path>      Override location of bootstrap class files
      -extdirs <dirs>            Override location of installed extensions
      -endorseddirs <dirs>       Override location of endorsed standards path
      -proc:{none,only}          Control whether annotation processing and/or compilation is done.
      -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
      -processorpath <path>      Specify where to find annotation processors
      -d <directory>             Specify where to place generated class files
      -s <directory>             Specify where to place generated source files
      -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
      -encoding <encoding>       Specify character encoding used by source files
      -source <release>          Provide source compatibility with specified release
      -target <release>          Generate class files for specific VM version
      -version                   Version information
      -help                      Print a synopsis of standard options
      -Akey[=value]              Options to pass to annotation processors
      -X                         Print a synopsis of nonstandard options
      -J<flag>                   Pass <flag> directly to the runtime systemSee the bold part.
    More information: [http://java.sun.com/docs/books/tutorial/java/package/managingfiles.html]

  • Could not find an installed JDK, SCM Java Tools may not work until registry

    Hello all,
    I've downloaded the latest full version of Designer (10.1.2.3), but getting installation error: Could not find an installed JDK, SCM Java Tools may not work until registry
    Any solution?

    3. install the Designer 10.1.2.3 patch to the Developer suite home.When I try to do this at C:\oracle\product\Ora10gDSR2, I get a message OUI-10137: An Oracle Home with name OUIHome already exits at C:\OraHome (a directory that doesn't exist) please specify another name for Oracle Home.
    I don't want to just specify another name because cleaning up these faulty installations requires deleting registry keys, etc, since the deinstall does't really remove everything sufficiently to start with a clean slate.
    I also got the Java JDK message because the JDK 5 is no longer being put straight onto the C drive, it is buried in C:\Sun\SDK\jdk, so some java programs have to be pointed to it. The Oracle installer doesn't provide this option.
    Also, Michael, your post, "Re: Designer 10.1.2.3 on windows Xp Posted: Oct 20, 2007 7:05 AM in response to: mmehdi" is full of unreadable characters and question marks. Maybe I don't have a font you are using. There are also references to a zip file and a Word document that aren't there.
    Anyway, thanks for all your time and effort,
    Edward

  • HT1338 Hi, as I shall correct Java for a new mountain ...? Java is currently not working at all Jarda

    Hi, as I shall correct Java for a new mountain ...?
    Java is currently not working at all
    Jarda

    Your question doesn't make much sense, so this is a WAG. Launch the Java Preferences.app in /Utilities, install the Java Runtime Environment when prompted, and, when that's finished, enable Java and Web Start apps.

  • Applets not working with Java 1.7.0_51 in MII 14.0 SP4 Patch 5

    Hi,
    I'm currently evaluating the migration of our MII 12.0 developments to MII 14.
    But I'm running in several issues just trying to use simple things like a SQL query template with an iGrid Display template in test mode.
    Used versions are: MII 14.0 SP4 Patch 5 and on client side the latest Mozilla Firefox with Java 1.7.0_51
    At first I always get a java security warning when the applet is being loaded about unsigned applications.
    At second the applet itself is not running. It always shows "No data available" and the java console shows the following errors (iResult is the id of the applet):
    iResult [ERROR] - Couldn't set query template: No Query Defined
    iResult [ERROR] - Couldn't set display template: null
    iResult [ERROR] - Couldn't set display template: null
    Is this perhaps a general problem, that the MII applets are not working with Java 1.7.x versions?
    If I call the same MII page from a client with Java 1.6.x it is working without errors.
    Do you have some suggestions for me?
    Regards Timo

    please clear your JAVA Cache. that should solve the JRE issue. thanks

  • Java Applets not working using IE 6 after uninstalling software

    I uninstalled some software on WinXP using Add/Remove, however the software still left remnants on my system. I tried to removing all the entries in the registry with RegEdit....I will confess I am a rookie with that tool, however now IE 6 will not launch Java Applets on the web sites I visit.
    I also have Mozilla Firefox 8 installed and Java Applets work fine using that browser. Do I have to reinstall WinXP to correct IE 6, or is there an easier alternative?
    Thanks for any suggestions
    Gerry

    Please check out in the IE Explorer Tools--> Internet Options --> in this Advanced tab this will display you with the set of options and chceck boxes...
    in that please check out that whether the Java(SUN) --- (USe Java....<applet> Requires reStart...
    is existing or not if existing please check it and restart the system.
    if it is not existing in your broser then you have to install the JRE in the system for your Applet to work..
    That can be downloaded form...
    http://www.java.com/en/download/manual.jsp
    Here go for windows....
    All The Best..

  • Java Applets not working with Firefox 5 properly

    Java Applets work sometime. But after sometime the Java icon at the bottom (near date & time) disappears. After this no matter what I do it does not work. Java Applets are used in this case to draw charts. The same charts come out properly in Internet Explorer. But I prefer using Firefox for its speed. What is the reason for this problem ?

    -> Tap ALT key or press F10 to show the Menu Bar
    -> go to Help Menu -> select "Restart with Add-ons Disabled"
    Firefox will close then it will open up with just basic Firefox. Now do this:
    -> Update ALL your Firefox Plug-ins https://www.mozilla.com/en-US/plugincheck/
    -> go to View Menu -> Toolbars -> unselect All Unwanted toolbars
    -> go to Tools Menu -> Options -> Content -> place Checkmarks on:
    1) Block Pop-up windows 2) Load images automatically 3) Enable JavaScript
    -> go to Tools Menu -> Options -> Privacy -> History section -> ''Firefox will: '''select "Remember History"'''''
    -> go to Tools Menu -> Options -> Security -> place Checkmarks on:
    1) Warn me when sites try to install add-ons 2) Block reported attack sites 3) Block reported web forgeries 4) Remember Passwords for sites
    -> Click OK on Options window
    -> click the Favicon (small drop down menu icon) on Firefox SearchBar (its position is on the Right side of the Address Bar) -> click "Manage Search Engines" -> select all Unwanted Search Engines and click Remove -> click OK
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE All Unwanted/Suspicious Extensions (Add-ons) -> Restart Firefox
    You can enable your Known & Trustworthy Add-ons later. Check and tell if its working.

  • Signed applet not working in firefox - java.security.AccessControlException

    Hello,
    I have a signed applet that works fine in IE 7 but in Firefox I'm getting this exception in the java console:
    java.security.AccessControlException: access denied (java.net.SocketPermission myhost.com resolve)
    I already tried to run the applet with different JRE versions in Firefox with the same result: 1.6.0_01, 1.6.0_02, 1.6.0_03, 1.6.0_05
    I'll appreciate your help.

    thanx 4 replying
    using the browser to view Applet is not recomended that is because if u change the the source-code and recompile the applet then run it using the broswer it will run the old-version
    Also i've found the solution here
    http://www.cs.utah.edu/classes/cs1021/notes/lecture03/eclipse_help.html

  • Swing components in applet not working in web browser

    Hi Guys,
    I've created an applet which makes use of some swing components, but unfortunately, not all of them function properly in my web browser (internet explorer or Mozilla Firefox). Its mainly the buttons; the last buttons works and displays the correct file within the broswer, but the first 5 buttons do not work...
    any help please on how I can sort this problem out?
    Heres the code for my applet:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.applet.*;
    public class MainAppWindow extends JApplet
    int gapBetweenButtons = 5;
    final JPanel displayPanel = new JPanel(new BorderLayout());
    public void init()
       //Panel for overall display in applet window.
       JPanel mainPanel = new JPanel(new BorderLayout());
       mainPanel.add(new JLabel(new ImageIcon(getClass().getResource("images/smalllogo2.gif"))),BorderLayout.NORTH);
       //sub mainPanel which holds all mainPanels together.
       JPanel holdingPanel = new JPanel(new BorderLayout());
       //Panel for displaying all slide show and applications in.
       displayPanel.setBackground(Color.white);
       displayPanel.add(new JLabel(new ImageIcon(getClass().getResource("images/IntroPage.jpg"))),BorderLayout.CENTER);
       displayPanel.setPreferredSize(new Dimension(590,400));
       JPanel buttonPanel = new JPanel(new GridLayout(6,1,0,gapBetweenButtons));
       buttonPanel.setBackground(Color.white);
       JButton button1 = new JButton("User guide");
       button1.addActionListener(
         new ActionListener() {
              public void actionPerformed(ActionEvent e)
                   if(displayPanel.getComponents().length > 0)displayPanel.removeAll(); // If there are any components in the mainPanel, remove them and then add label
                   displayPanel.setBackground(Color.white);
                   displayPanel.add(new JLabel(new ImageIcon("images/UserGuide.jpg")));
                   displayPanel.revalidate(); // Validates displayPanel to allow changes to occur onto it, allowing to add different number images/applicaions to it.
       JButton button2 = new JButton("What is a Stack?");
       button2.addActionListener(
       new ActionListener() {
               public void actionPerformed(ActionEvent e)
                   if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                   displayPanel.setBackground(Color.white);
                   displayPanel.add(new JLabel(new ImageIcon("images/WhatIsAStack.jpg")));
                   displayPanel.revalidate();
       JButton button3 = new JButton("STACK(ADT)");
       button3.addActionListener(
       new ActionListener() {
             public void actionPerformed(ActionEvent e)
                   if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                   displayPanel.setBackground(Color.white);
                   displayPanel.add(new JLabel(new ImageIcon("images/StackADT.jpg")));
                   displayPanel.revalidate();
       JButton button4 = new JButton("Stacks in the Real World");
       button4.addActionListener(
       new ActionListener() {
             public void actionPerformed(ActionEvent e)
                   if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                   displayPanel.setBackground(Color.white);
                   displayPanel.add(new JLabel(new ImageIcon("images/StacksInTheRealWorld.jpg")));
                   displayPanel.revalidate();
       JButton button5 = new JButton("DEMONSTRATION");
       button5.addActionListener(
       new ActionListener() {
             public void actionPerformed(ActionEvent e)
                 if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                 Demonstration app = new Demonstration();
                 JPanel appPanel = app.createComponents();//gets the created components from Demonstration application.
                 appPanel.setBackground(Color.pink);
               displayPanel.add(appPanel);
               displayPanel.revalidate();
       JButton button6 = new JButton("Towers Of Hanoi");
       button6.addActionListener(
       new ActionListener() {
             public void actionPerformed(ActionEvent e)
                     if(displayPanel.getComponents().length > 0)displayPanel.removeAll();
                     TowerOfHanoi app = new TowerOfHanoi();
                     JPanel appPanel = app.createComponents();//gets the created components from Towers of Hanoi
                     JPanel mainPanel = new JPanel();//panel used to centralise the application in center
                     mainPanel.add(appPanel);
                     mainPanel.setBackground(Color.pink); //sets mainPanel's background color for 'Towers Of Hanoi'
                     displayPanel.add(mainPanel);
                     displayPanel.revalidate();
       //adding buttons to the buttonPanel.
       buttonPanel.add(button1);
       buttonPanel.add(button2);
       buttonPanel.add(button3);
       buttonPanel.add(button4);
       buttonPanel.add(button5);
       buttonPanel.add(button6);
       JPanel p = new JPanel(); // Used so that the buttons maintain their default shape
       p.setBackground(Color.white);
       p.add(buttonPanel);
       holdingPanel.add(p,BorderLayout.WEST);
       holdingPanel.add(displayPanel,BorderLayout.CENTER);
       //Positioning of holdingPanel in mainPanel.
       mainPanel.add(holdingPanel,BorderLayout.CENTER);
       //indent mainPanel so that its not touching the applet window frame.
       mainPanel.setBorder(BorderFactory.createEmptyBorder(10,20,10,20));
       mainPanel.setBackground(Color.white);
       mainPanel.setPreferredSize(new Dimension(850,600)); //size of applet window
       mainPanel.setOpaque(false); // Needed for Applet
       this.setContentPane(mainPanel);
    }

    Thanks for the response. I don't quite understand what you're talking about though. I have, in my humble knowledge, done nothing with packages. I have put the applet class (WiaRekenToolActiz.class is the applet class) in the jar file wia_actiz_archive.jar. From what I read on the tutorial, java looks for the applet class in all the jar files specified. Since I put my CODEBASE as the main url, I thought it baiscally didn't matter where you out the html file.
    I shall include the complete html page complete with applet tag to perhaps illuminate a bit more what I mean...
    <html>
    <head>
    <title>Wia Rekenmodule hello!</title>
    </head>
    <body bgcolor="#C0C0C0">
    <applet
    CODEBASE= "http://www.creativemathsolutions.nl/test"
    ARCHIVE= "Actiz/wia_actiz_archive.jar, Generic/wia_archive.jar"
    CODE="WiaRekenToolActiz.class" 
    WIDTH=915 HEIGHT=555
    >
    <PARAM NAME = naam VALUE = "Piet Janssen">
    <PARAM NAME = gebdag VALUE = "01">
    <PARAM NAME = gebmaand VALUE = "06">
    <PARAM NAME = gebjaar VALUE = "1970">
    <PARAM NAME = geslacht VALUE = "man">
    <PARAM NAME = dienstjaren VALUE = "10">
    <PARAM NAME = salaris VALUE = "56500">
    <PARAM NAME = deeltijdpercentage VALUE = "100">
    <PARAM NAME = accountnaam VALUE = "Zorginstelling 'De Zonnebloem'">
    </applet>
    </body>
    </html>

  • Applet not Working.Why???

    I have written an applet program but it does not work
    It works when i did it as an application.
    I have installed JAVA plug in.The HTML and Applet codes
    are in the same directory as JDK
    The web browser comes up with a grey area & the following messages:
    Exception:java.lang.ClassNotFoundException:testing4.class
    (on the grey area)
    Applet testing4 not loaded (at the bottom of the browser)
    Why is this so?
    The code i have used are as follows:
    HTML CODE
    <html>
    <title>LPC
    </title>
    <applet code="testing4.class"  width=400 height=110>
    </applet>
    </html>APPLET PROGRAM CODE
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    //import java.lang.Object;
    public class testing4 extends JApplet
    { private JTextArea display;
      private JScrollPane scrollPane2;
      private JButton paste;
      private JPanel P2;
      private File fileName;
      public void init()
        paste=new JButton("paste");
        paste.setMinimumSize(new Dimension(90,20));
        paste.setPreferredSize(new Dimension(90,20));
        paste.setMaximumSize(new Dimension(90,20));
        copyhandler pa=new copyhandler();
        paste.addActionListener(pa);
        display=new JTextArea();
        scrollPane2=new JScrollPane(display);
        scrollPane2.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane2.setMinimumSize(new Dimension(200,58));
        scrollPane2.setPreferredSize(new Dimension(200,58));
        scrollPane2.setMaximumSize(new Dimension(200,58));
        P2=new JPanel();
        P2.setMinimumSize(new Dimension(200,80));
        P2.setPreferredSize(new Dimension(200,80));
        P2.setMaximumSize(new Dimension(200,80));
        P2.setLayout(new BoxLayout(P2,BoxLayout.Y_AXIS));
        scrollPane2.setAlignmentX (Component.LEFT_ALIGNMENT);
        P2.add(scrollPane2);
        paste.setAlignmentX(Component.LEFT_ALIGNMENT);
        P2.add(paste);
       Container c=getContentPane();
        c.add(P2);
       //COPIES TEXT FROM FILE ON MY DISK TO THE TEXTAREA
       private class copyhandler implements ActionListener
       { public void actionPerformed(ActionEvent event)
         { JFileChooser fileChooser = new JFileChooser();
           fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY );
           int result = fileChooser.showOpenDialog(testing4.this);
           // user clicked Cancel button on dialog
           if ( result == JFileChooser.CANCEL_OPTION )
             return;
           fileName = fileChooser.getSelectedFile();
           if ( fileName == null ||
              fileName.getName().equals( "" ) )
           JOptionPane.showMessageDialog( null,"Invalid File Name",
                                            "Invalid File Name",
                                          JOptionPane.ERROR_MESSAGE );
           else
           { try
             { FileReader in = new FileReader(fileName);
               BufferedReader reading= new BufferedReader(in);
               String store="";
               while (reading.ready())
               { StringTokenizer st = new StringTokenizer(reading.readLine());
                 store=store+st.nextToken()+"\n";
               display.setText(store);
             catch ( IOException e )
             { JOptionPane.showMessageDialog( null,
                                          "Error Opening File", "Error",
                                          JOptionPane.ERROR_MESSAGE );
      public static void main (String [] args)
      { testing4 done =new testing4();
        JFrame frame = new JFrame("testing");
        frame.addWindowListener(new WindowAdapter()
                                 public void windowClosing(WindowEvent e)
                                   System.exit(0);
        done.init();
        frame.getContentPane().add(done);
        frame.pack();
        frame.setSize(205,110);
        frame.setVisible(true);
    }

    It Still giving a blank page.
    New Code
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    //import java.lang.Object;
    public class testing4 extends JApplet
    { private JTextArea display;
      private JScrollPane scrollPane2;
      private JButton paste;
      private JPanel P2;
      private File fileName;
      public void init()
        paste=new JButton("paste");
        paste.setMinimumSize(new Dimension(90,20));
        paste.setPreferredSize(new Dimension(90,20));
        paste.setMaximumSize(new Dimension(90,20));
        copyhandler pa=new copyhandler();
        paste.addActionListener(pa);
        display=new JTextArea();
        scrollPane2=new JScrollPane(display);
        scrollPane2.setVerticalScrollBarPolicy(
                            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane2.setMinimumSize(new Dimension(200,58));
        scrollPane2.setPreferredSize(new Dimension(200,58));
        scrollPane2.setMaximumSize(new Dimension(200,58));
        P2=new JPanel();
        P2.setMinimumSize(new Dimension(200,80));
        P2.setPreferredSize(new Dimension(200,80));
        P2.setMaximumSize(new Dimension(200,80));
        P2.setLayout(new BoxLayout(P2,BoxLayout.Y_AXIS));
        scrollPane2.setAlignmentX (Component.LEFT_ALIGNMENT);
        P2.add(scrollPane2);
        paste.setAlignmentX(Component.LEFT_ALIGNMENT);
        P2.add(paste);
       Container c=getContentPane();
        c.add(P2);
       //COPIES TEXT FROM FILE ON MY DISK TO THE TEXTAREA
       private class copyhandler implements ActionListener
       { public void actionPerformed(ActionEvent event)
         { JFileChooser fileChooser = new JFileChooser();
           fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY );
           int result = fileChooser.showOpenDialog(testing4.this);
           // user clicked Cancel button on dialog
           if ( result == JFileChooser.CANCEL_OPTION )
             return;
           fileName = fileChooser.getSelectedFile();
           if ( fileName == null ||
              fileName.getName().equals( "" ) )
           JOptionPane.showMessageDialog( null,"Invalid File Name",
                                            "Invalid File Name",
                                          JOptionPane.ERROR_MESSAGE );
           else
           { try
             { FileReader in = new FileReader(fileName);
               BufferedReader reading= new BufferedReader(in);
               String store="";
               while (reading.ready())
               { StringTokenizer st = new StringTokenizer(reading.readLine());
                 store=store+st.nextToken()+"\n";
               display.setText(store);
             catch ( IOException e )
             { JOptionPane.showMessageDialog( null,
                                          "Error Opening File", "Error",
                                          JOptionPane.ERROR_MESSAGE );
      public static void main (String [] args)
      { testing4 done =new testing4();
        //you did not set applet's width and height:
        //applet is a container too
        done.setWidth(205);
        done.setHeight(110);
        JFrame frame = new JFrame("testing");
        frame.addWindowListener(new WindowAdapter()
                                  public void windowClosing(WindowEvent e)
                                  { System.exit(0);
        done.init();
        frame.getContentPane().add(done);
        frame.pack();
        frame.setSize(205,110);
        frame.setVisible(true);
    }

  • Java plugin is not working properly

    I have FF 16.0.1 and Java plugin 7 u 9, this is not the java with security problems...
    http://web.psjaisd.us/auston.cron/ABCronPortal/GeoGebraMenu/Investigating%20Parent%20FunctionsUsing%20GeoGebraGeoGebra%20is%20graphing.htm
    loads very slowly or not at all, including the majority of the links on the page...this is a menu to multiple Java applets in GeoGebra. This page has a preload link which causes a problem. All links are java applets which until your security issues on Java were implements worked flawlessly and better than any other browser service...
    You are forcing me to us IE, which I despise!
    I cannot copy from crashing page...

    So, you are having problems with Java 7 update 9 in Firefox? You said "until your security issues on Java were implements worked flawlessly and better than any other browser service..." I don't know what you mean. Java security updates are from java.com (Oracle) not Mozilla.
    In case it helps, I downgraded from Java 7 to Java 6 awhile back for security reasons and I'm now running [http://java.com/en/download/manual_v6.jsp Java 6 Update 37], which is the latest Java 6 and has all current security patches. (I'll eventually switch back to Java 7 once Java 6 is no longer supported). Except for a few of the links loading slowly, I don't see any issues on the page you mentioned. Hopefully someone with Java 7 u9 will be along and test the links but you could try uninstalling Java 7 and installing Java 6. More on Java here:
    *http://kb.mozillazine.org/Java
    *[[Use the Java plugin to view interactive content on websites]]
    You also said, "I cannot copy from crashing page". Is Firefox crashing? Do you have any recent crash reports?
    #Enter about:crashes in the Firefox location bar (that's where you enter your website names) and press Enter. You should now see a list of submitted crash reports.
    #Copy the most recent 5 report IDs that you see in the crash report window and paste them into your forum response.
    More information and further troubleshooting steps can be found in the [[Firefox crashes]] article.
    Also, Firefox 16.0 is not the current version and is insecure. See http://www.mozilla.org/security/known-vulnerabilities/firefox.html
    Unless you have reasons for using an older version despite the vulnerabilities, you should [[update Firefox to the latest version]], currently 17.0.1.

Maybe you are looking for

  • How do I move just my movies folder (not the entire iTunes library) to an external hard drive and still be able to watch movies?

    My movies library is getting frighteningly large, and I want to move it (not the entire library) to an external HD, and still be able to watch the movies (when the HD is connectec). How would I do that?

  • ABAP PROXY - how to load a new field into SAP SNC system

    I am also curious about the proxy process. Please let me know if you know of a post that has mentioned this before. We have to customize our Delivery Schedule Notification proxy. I already regenerated the standard one into a Z proxy name. I already p

  • How can I record a basic sound clip?

    I am new to macs and switched from a pc recently, so please excuse me if this is a silly question, but I am totally stumped. I have been trying to record just a simple 20 second sound clip on my imac and cannot do it right. I recorded the sound clip

  • .m4v to idvd

    i've downloaded some movies (.m4v) and converted them to a dv format. The file size was 8Gig!!!! Is there any other way to format a movie file to idvd using isquint or handbrake???? I tried converting the .m4v file in imovie, which took 2 hours, but

  • XI 2.0, JDBC-Adapter and Oracle

    Hello together, at the moment I'm working on a scenario, at this I have to write data in a CLOB-Field of a table in a Oracle 9i database. My problem now is, that I only can write a string with a maximum length of 3000 chars directly in the database.