java and files

Started by
3 comments, last by CProgrammer 18 years, 5 months ago
I know java is client side but is there nevertheless a way to write files on the server? -CProgrammer
Advertisement
If your server has some script set up that lets you write then yes. Basically just consider Java like a normal program though once it's running on the client - it has nothing to do with where it was served from.
So how do I do it then. Have some php script that is called by java? If so how do I call the script, pass parameters, without the user noticing it?

-CProgrammer
Java is a programming language, with which you write programs that could run in a Java Virtual Machine (VM). There is no client / server relation.

If you have a normal Java app, then you have to connect to a HTTP server by using a socket. Or do you have a Servlet / Applet? _That_ stuff runs server / client side. An applet has some a-priori connection to the server it is loaded from, as far as I know.

Calling a PHP script (or any other CGI) is of course possible from a pure Java app as well as from an Applet, since the CGI script isn't interested in _what_ it is called from, but only _how_ it is called.

In short: you have to give more details about what you are doing / wants to do.

However, you should be aware that you may pierce your network security if not considering the common CGI security tips.
Im doing an applet.

This topic is closed to new replies.

Advertisement