Results 1 to 5 of 5
  1. #1
    ownlol is offline Member
    Join Date
    Jul 2008
    Posts
    2
    Rep Power
    0

    Default 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

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,772
    Rep Power
    25

    Default

    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.

  3. #3
    ownlol is offline Member
    Join Date
    Jul 2008
    Posts
    2
    Rep Power
    0

    Default

    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?
    Last edited by ownlol; 07-20-2008 at 11:44 PM.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,772
    Rep Power
    25

    Default

    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.

  5. #5
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Post basically, yes

    Quote Originally Posted by ownlol View Post
    well my friend hasn't decided which server he wants to use. But i will check out Tomcat.
    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.

    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.

    Quote Originally Posted by ownlol View Post
    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?
    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.

    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.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Similar Threads

  1. Applet to HTML Driving me bonkers
    By proud2bhaole in forum Java Applets
    Replies: 6
    Last Post: 04-14-2010, 03:08 PM
  2. Chat Applet in HTML
    By Flynazn in forum Java Applets
    Replies: 3
    Last Post: 05-27-2008, 10:26 AM
  3. How to view applet from html page.
    By jwzumwalt in forum Java Applets
    Replies: 2
    Last Post: 11-24-2007, 05:21 AM
  4. How to pass an html variable as an applet value
    By fred in forum Java Applets
    Replies: 1
    Last Post: 08-06-2007, 04:28 AM
  5. Create a Applet in the page HTML
    By Daniel in forum Java Applets
    Replies: 2
    Last Post: 07-04-2007, 08:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •