Java Applet HTML
hi my name is Brandon, new user to this forum and well to programming in java lol.
My friend wants me to build him a website, and I don't know the best way of doing it. So I chose Java seeing that is the best language I know.
So here's the thing, the website will have a the user to login with a name/password. This applet will then go to a txt file to validate the name/pass. If everything is correct the user will then be allowed to go in and complete a form (listing their address etc.) This form will be saved on a server under the user's name.
Is this do-able using Java applets?
any help would be appreciated
Partly. The applet can get the data from the user, read a file on the server and use that info to validate the user. However, there wouldn't be any security. If someone could get the name of the file being read by the applet, they could read the file directly.
To be secure you'd need code on the server to do the verify.
The applet could gather the info to be saved on the server, but the applet can NOT write on the server. Again you'll need server side code to save the info.
What server are you using? Tomcat is a free server that provides support for servlets.
well my friend hasn't decided which server he wants to use. But i will check out Tomcat.
So your saying the applet can read from the file on the server, but can't write. Could I use Tomcat to write info taken from the applet on the server?
Yes, the applet can only read from the server, just the same as a browser does.
Tomcat is a server that would execute servlet code that you could call from the applet.
Another way to have data written on a server, is to have a cgi program, such as Perl that is called from the applet to write on the server.
For this project you'll need to do some research on HTTP protocol and servers.
Yes, do. Probably end up using NetBeans. Read up for now. Do not hire the first server you find. There is a great variance in the quality of servers actually available. If you have an internet connection, often you can use that as an internets server. It just gets deeper and deeper like Alice in Wonderland, but you can always find free servers in a matter of minutes or hours if you know what to look for and how to look for it.
Originally Posted by ownlol
Read Complete Idiot's Guide to ..... as the first book, then go to O'Reilly books to start your first real efforts. I have found Elsevier, Addison-Wesley Charles-River Media and John-Wiley to be the players that plan to stay. You can get any title at the library, just becuase it is not on the shelf does not be a problem.
Tomcat can talk to the applet all it wants to, writing files is another matter. Consider the html written to the browser as a file.
Originally Posted by ownlol
You can begin that today, write an html file and open it right there. HTML is safe and easy place to start. The code you write today can be used later when,.....
I still use the first html page I ever wrote. There is a free webserver right in the sample documentation that comes with the Java Development Kit. It will run right there on your computer.