Applet to write file on IE4.0

Hi all,
Please help, the situation is like this,
server has no support for web, no Java plugin...
client browsers' are equipped only with IE4.0, and they will not be upgraded nor plugged with Java Plug-in.
On these strict circumstances, how could i run an applet to read/write files?
if the applet is converted to an application, file permission problem should be solved, but how could the clients run the CLASS/JAR files without installing JRE...
pls help, it's in ergent. (have to finish the program in this week!!)
Thank you a million!!!!!!
J.

New foundings!
As the server is running Netware 4.2, is that possible if i just install JVM on the server and problem will be solved?
J.

Similar Messages

  • Applet read/write files

    Hi,
    I have a problem to use getCodeBase to get the URL. Actually, I am pretty confused on running the applet in our intranet.
    Let me explain my problem here, I have mapped a network drive(G:\personA) in my machine and my applet and all the files are in G:\personA\classes. In my coding, I have tried to specify my files paths such as G:\personA\classes\index.txt and I can run the applet without any problem either with Eclipse or from a web site http://personA//report.html. But the other members in this company cannot run this applet thro' this web site( http://personA//report.html). The problem is "No class found", can't find the path G:\personA\classes\index.txt.
    So I decided to change my code by reading/writing files thro URL i,e : http://personA/classes, but when I run my applet, I got the following exception :
    ava.lang.NullPointerException
         at java.applet.Applet.getCodeBase(Applet.java:136)
         at web.MyChart.readAndPrintData(MyChart.java:336)
         at web.MyChart<init>(MyChart.java:113)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:308)
         at java.lang.Class.newInstance(Class.java:261)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
         at sun.applet.AppletPanel.run(AppletPanel.java:298)
         at java.lang.Thread.run(Thread.java:534)
    does anybody knows how to solve this problem?? Please...
    Thanks,
    Tiffany

    I think a trace would help, guessing is fun but won't solve your problem:
    To turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)

  • Sign Applet to write on LPT1 port - permission error

    Hi,
    I have this simple applet
    import java.awt.*;
    import java.applet.*;
    import java.util.*;
    import java.io.*;
    public class TestJavaXp extends Applet{
         public void putJavaArray(String arrayAsAString) {
         int i = 0;
         String s = "Stampa questo testo";
             try {
              FileWriter out = new FileWriter("LPT1");
              out.write(s);     
              out.flush();
              out.close();     
             catch (IOException e) {
              e.printStackTrace();
    }I signed the applet but I receive this error:
    uncaught exception: Error calling method on NPObject!
    *[plugin exception: java.security.AccessControlException: access denied (java.ioFilePermission LPT1 write)]*
    It works perfectly only if I grant permissions in the java.policies file.
    Why?
    I've no problem signing applets that write files on disk, I've troubles only with LPT1 port but I need it.
    I tried different browsers.
    Can anyone help me?
    Thanks.

    New foundings!
    As the server is running Netware 4.2, is that possible if i just install JVM on the server and problem will be solved?
    J.

  • How  applet write file in local system by URL instead of FileOutputStream()

    hi,
    how can applet write a file in local system through URL instead of FileOupStream()
    plz.....plz.....plz......
    URL url = new URL(" file://c:/temp.txt");
    in this url how applet can write
    plz....

    URL uses http to cummunicate, this means you can send and receive data using the http
    protocol.
    The OS doesn't do anything with this, you need a http server to interpret these messages
    and take appropriate action (with server side script or CGI).
    So if the client has a http server installed and has server side script thad does
    something with your http request (that's what a url does) than it is possible.
    Since both having a http server , server side script and or CGI have nothing to do with
    signed applets I will not answer your question here.
    But the mail reason I won't answer it is because it makes no sence to use a URL to write
    to the local file system.

  • Write files on a Server with an Applet

    How can I write files (like php) on my server with an applet? Can anybody explain it step for step?

    Yes... but then...? I thinked applets have no
    permission to write files...The correct sentence is: unsigned applets don't have permission to write files locally. Also, unsigned applets cannot access any other server than the one they came from. You don't seem to do either, so it might work without signing. And if you need sining, just sign it.
    What I don't know is how you can use an FTP or any other 3rd party library in combination with an applet... dunno if the user needs to have it locally or whether the applet can pull it off your server if needed.

  • Write file with signed applet

    Hi!
    I have a signed applet which has to write a file to the server, but i still get permission exceptions. I guess I still have to add permissions to the applet but I realy can't find how to do that. Can anyone give me a short tutorial on how to add permissions to the applet?
    greetings

    As stated, applets are only able to write files in the machine that the applet is running on. They can't write files to other machines. They can communicate to the machine that they originate from (its host) - but not other, random machines.
    To place a file on its host, the applet sends the file contents to its host (typically using sockets for this) which receives the data with a server program. Then another program on the host writes the data to a file. If you want the file on another, random machine then it can be transferred using the same approach (sockets, etc.)
    There are alternatives, but this is the least complicated approach. This tutorial walks you through creating an applet and the host it communicates with.
    [http://java.sun.com/docs/books/tutorial/deployment/applet/server.html]
    Note that the tutorial also has a link to a more detailed tutorial, the Custom Networking Trail.

  • Is thr way to applet write file, client machine without  entry in policy

    hi,
    is there any way to allow applet write file in local machine (client ) without entry in policy file... i feel this extra step to clients...
    To achieve this what are class i have to implements...

    No, thank God there isn't.

  • Remote Client Applet -Write File - Cannot be Done

    I've concluded that it is not possible for an applet embedded in a web-browser to write to a clients hard-disk no matter what you do with signing, policytool or RSA certificates.
    HD

    We can write, if the applet or jar file is signed

  • How to write file to server side?

    hello,
    Could anyone pls help me...
    I just want to see an example how can I write to a file that is placed at the server(save place as the applet).
    p.s. I have been successfully read a file from there...
    Suppose I have signed the applet (self-signed), anymore security problem I need to pay attention to?
    Thanks a lot!!

    hi mandy, from the applet u can send the file to be written into the server to a servlet running in server and the servlet can in turn write the file into the servlet. by applet - servlet communication, u can easily read and write files to the server.

  • Write to file??? looking for a solution to write file to the server

    Dear all,
    Since most browsers forbid all file access, so is there is another way to write file to server in applet??? or is there an alternative using combination of JSP??
    Thank you for your attention,
    Dan

    If you have access to the server you are writing the file to then you could have your applet collect information and send it to the server in a form. Then write a bean or other class that handles it and writes it to the server.

  • Out of memory error when Applet transferring a file of size 600 MB

    Hi ,
    I have an Applet which transfer files from client machine to server using streams.
    I have a servlet which reads data sent from Applet.
    This is working fine when i Transfer files of size 10 MB
    when I chose a file of 600 MB the following error is thrown at Applet side after some time.
    java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Unknown Source)
         at java.io.ByteArrayOutputStream.write(Unknown Source)
         at sun.net.www.http.PosterOutputStream.write(Unknown Source)
         at java.io.DataOutputStream.write(Unknown Source)
         at Apple.FileUploadApplet.actionPerformed(FileUploadApplet.java:53)Here is my Applet Code
    if(ae.getSource() == jbutton)
         JFileChooser jfc=new JFileChooser();
         jfc.showOpenDialog(null);
    File f=jfc.getSelectedFile();
    try
    FileInputStream in = new FileInputStream(f);
    byte[] buf=new byte[1024];
    int bytesread = 0;
    String toservlet = "http://9.122.18.115:8080/FileTransfer/FileUpload?"
                                  + URLEncoder.encode("name") + "="
                                  + URLEncoder.encode(f.getName());
    URL servleturl = new URL(toservlet);
    URLConnection servletconnection = servleturl.openConnection();
    //servletconnection.setRequestMethod("GET");
    servletconnection.setRequestProperty("Content-type",
                "application/octet-stream");
    servletconnection.setDoInput(true);
    servletconnection.setDoOutput(true);
    servletconnection.setUseCaches(false);
    servletconnection.setDefaultUseCaches(false);
    DataOutputStream out = new DataOutputStream(servletconnection.getOutputStream ());
    while( (bytesread = in.read( buf )) > -1 )
    out.write( buf, 0, bytesread );
    // out.flush(); // tried this to flush the data but didn't work
    System.out.println("writing data");
    out.flush();
    out.close();
    in.close();
    DataInputStream inputFromClient = new DataInputStream(servletconnection.getInputStream() );
    //get what you want from servlet
    inputFromClient.close();
    catch(Exception e)
    e.printStackTrace();
    }My Servlet Code
    public void doPost(HttpServletRequest req,HttpServletResponse res)
    ServletContext sc = this.getServletContext();
    try
    String path = "C:\\Downloads\\";
    String  fileName=req.getParameter("name");
      System.out.println("name="+fileName);
    File yourFile = new File(path+fileName);
      System.out.println("name="+yourFile);
    FileOutputStream toFile = new FileOutputStream( yourFile );
    DataInputStream fromClient = new DataInputStream( req.getInputStream() );
    byte[] buff = new byte[1024];
    int cnt = 0;
    int k=0;
    long st,et;
    st=System.currentTimeMillis();
    while( (cnt = fromClient.read( buff )) > -1 ) {
    toFile.write( buff, 0, cnt );
    //System.out.println("writing data=="+ k++);
    et=System.currentTimeMillis();
    toFile.flush();
    toFile.close();
    fromClient.close();
    int tt=(int) ((et-st)/1000);
    System.out.println("total time for "+fileName+" Download ="+tt+" secs");
    System.out.println("total time for "+fileName+" Download ="+(tt/60)+" mins");
    catch(Exception e)
    e.printStackTrace();
    }Please Help me out...

    yeah its working fine. Thank you very much..
    But it would be better if we provide the chunklength rather than using a zero to upload the file fastly.

  • Applet: writing to file

    hi there.
    i need serious help on using an applet and writing the user response into a text file.
    issit possible in the first place? cos i read at a lot of sources saying applet cant write to file?
    any help is much appreciated
    thx!

    Where do you plane on writing the file to server where the applet is or on the client machine? Applets can only write to files that are on the same filesystem or on the same machine that it was loaded into the browser from. So if you want user to run this applet and have it write out a file you will have to get them to download the .class file and then run it from their computer.
    here is somthing might help a bit more.
    http://java.sun.com/sfaq/#read
    Please give more detail about what you want to.

  • Read and Write Files to user from Forms Server

    We are developing an application that requires us to rread and write files to the user system. We are deploying using the developer/forms server and this is not happenning. The text_io package and the d2wkutil operate on the application server system, not the user system. So is there a method to read the file contents into the app and write files out to the user system across the web. Thanks.

    developer6 can interact with javabeans. the javabean runs as an applet on the client machine. all you have to do is setup a javabean that read and write to your client machine.
    when you test your application, work with java console open so you'll be able to debug your appliacion, if you'll receive java security execption you may need to sign this javabean. look at sun site for info regarding the usage of javakey for signing java classes and jars.

  • Applets and accessing files confusion

    Hi
    I am confused about applets and their abilty to access files.
    I know that applets cannot access files on a users hard drive until given pemission but if i design an applet that needs access to files on the server where it is running will it be able to read and write those files in the same location as the applet without the need to set permissions?
    Any feedback would be great
    Neil

    The applet is very much able to read files from the server. This is easiest done by creating a URL and opening a stream to it:
    URL url = new URL(getCodeBase(), "file.dat");
    InputStream in = url.openStream();
    // read from the stream...
    in.close();
    Saving files to the server is also possible without setting permissions but it's a bit harder. In short, you need some sort of server that accepts a connection and saves what you send it to disk. The server can be eg. a servlet, a database or a FTP server.

  • Can't write files!!!

    I need some code or a clear tutorial that explains how to write files using an applet. i want to create a game that you can save on so i want to save it to the server. can anyone help?
    thnx

    that site doesn't fully explain how to write files to
    a database from an applet. can u give something else.Well, it does answer some questions as to why you can't write files from an applet and I thought it would give you a better understanding of it and you could narrow your search into finding an answer. I guess I was wrong.
    Good luck though.

Maybe you are looking for

  • Acrobat 8.1.2 Pro: Extremely slow printing

    Whenever Acrobat Pro (8.1.2 on OSX 10.4.11) is used to print, pages print extremely slow, up to 5 minutes or more per page. When printing documents, bigger dan 100 pages, in several hours it will print, but contributes a zero kb file to the print que

  • In how many computers can i install adobe creative cloud?

    i need it in two different computers in two different countries. Is it possible for us to use only one account?

  • An Invalid Setup has been detected for the current Transaction Type in AME

    Gurus, I am constantly getting an error An Invalid Setup has been detected for the current Transaction Type in Approvals Management My client have 3 units say A,B,C. A requirement is such that whenever a vacancy is created, an approval should be soug

  • Drag and drop photo in elements 12

    Trying to drag an edited picture from photobin in Elements 12 onto a blank documents. Elements is resizing my photo to fit the blank document. I don't want it to resize. I want to drag and drop multiple photos onto a new blank doument as I have in ot

  • Run time error in ALV editable on Class implementation

    I am getting a runtime error GETWA_NOT_ASSIGNED again ( This error was resolved yesterday thanks to an expert ) after I implemented a class to handle screen events in an editable ALV . Without the class the program was working and was able to insert