• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

download word document and rewrite it with updated data to same location

Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

a word file stored in a server will be opened by clients on their IE. This word file is opened by firing a http request
similar to http://ip of machine/contextName/folderName/filename.doc

now i have a requirement where the person updates the word file and clicks save. The updated word file should now be there in the place of the old file.
i cannot upload the file again after the change. when i say save (may be a button or the "save" button) in the word file.

is there any way how i can accomplish this.?? Any suggestions are always welcome.

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe this helps,

// Here is a server side java applet which gets the file from the client.
// The way it demonstrates it received the file from the client (meaning the file
// upload was successful) it just spits out the file back to the browser.
// Start of Server Side Java Applet code

import netscape.server.applet.HttpApplet;
import netscape.server.applet.ServerApplet;

import java.io.*;
import java.net.Socket;
import java.net.InetAddress;
import java.lang.IndexOutOfBoundsException;
import java.util.Hashtable;
import java.util.Enumeration;

class FormApplet extends HttpApplet {

public void run() throws Exception {
Hashtable formdata;
int x;
PrintStream out = getOutputStream();

InputStream is = getInputStream();
DataInputStream di = new DataInputStream(is);

if (returnNormalResponse("text/html")) {

PrintStream POut = getOutputStream();
String line;

while ((line = di.readLine()) != null)
private static final String header = "<h1>Form results</h1>\n<ul>\n";
private static final String trailer = "</ul>\n";

// This is the HTML file calling the server side applet
// What this HTML file does is allows a user to select a file which
// can be uploaded to the server

DevEdge Request Form
Incident Submit Form
<FORM ENCTYPE="multipart/form-data"
ACTION="http://graphite/server-java/FormApplet/" METHOD=POST>
<TD> File Name </TD>
<INPUT TYPE="submit" VALUE="Submit"> <INPUT TYPE="reset" VALUE="Clear
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic