java applet connecting to web page
I have an applet that can show several messages, one at a time. The messages are all written in a class file.
I want:
- that the messages be written in a txt file in the server.
- each time the applet need to show a message, it call the server and asks for the message.
- the ".txt" file could not be downloaded in the internet browser.
The aim is preventing the user download all the messages with one single click ( Save as .. )
Because the question involves more than one technology ( java, php, apache, ¿ javascript ? ) its not easy to find the answer.
I dont expect a detailed answer, just the guidelines. Thanks in advance.
Re: java applet connecting to web page
Moved to Applets section.
Is is OK for the applet to read the full contents of the text file with one request?
What code do you have on the server that the applet can communicate with?
If the applet uses HTTP GET to read the text file, if someone got the name of the file, they could download it into the browser.
You could encode/encrypt the text file to make it harder for anyone that downloads it to read it.
Re: java applet connecting to web page
Quote:
Is is OK for the applet to read the full contents of the text file with one request?
It does not mind, although it would be better download one line ( one message ) per request.
Quote:
What code do you have on the server that the applet can communicate with?
PHP and SQL. An I hardly know what they are about.
Quote:
If the applet uses HTTP GET to read the text file, if someone got the name of the file, they could download it into the browser.
If anyone could guess the name of the file, he deserves hacking my web page.
So, I will explore the GET command.
Thanks for your quick reply.