File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JNLP and Web Start and the fly likes Outputting data to file on server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Outputting data to file on server" Watch "Outputting data to file on server" New topic

Outputting data to file on server

L Vaught

Joined: Feb 27, 2005
Posts: 1
I am writing a database-style application to be launched using Web Start. When the application starts, it reads data from files that are stored on the server. As the program runs, the data could potentially be changed by the user. I need help figuring out how to save the current status of the data on the server when the program exits. I've tried using URL and URLConnection for file I/O, and this works for reading the data, but it doesn't work for saving the data. When my program exits, no exceptions are thrown, but no changes are made to the data files on the server. I've spent quite a bit of time researching this problem, and it seems like I might have to use a servlet or something to process the data on the server-end. The problem is, I don't know anything about servlets or CGI. Any suggestions for the simplest way to achieve the results I need would be much appreciated!
Cristian Negresco
Ranch Hand

Joined: Sep 15, 2001
Posts: 182

Why do you want to save the files just when the user exists? Do they actually refer just to the state of the user on the tier 1 machine and do not affect the tier 2 application as a whole?

If that is the case you might actually save the state using the jnlp API, and save the state just on the local machine. <- this is wild guess

If you really need to modify the files on the server you might use EJB's.

I agree. Here's the link:
subject: Outputting data to file on server
It's not a secret anymore!