Solved

Save date and time using JAVA applet

Posted on 1997-07-08
5
200 Views
Last Modified: 2010-04-16
Anyone can give FULL programme of JAVA APPLET that save the date and time when people visit my homepage?
( I really want use JAVA to write the programme, but not in other methods )
0
Comment
Question by:ccst
5 Comments
 
LVL 1

Expert Comment

by:byoung
ID: 1222787
If all you want is time and date, I'd use JavaScript instead of Java.  You can define a cookie for the user, then an array of login times for that cookie, then spit out how long since last time they were there, since the first time, etc.  If you want JS, go to:
http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/
and look for cookie, document, time, and alert, and in five minutes you'll have it.  It's not too hard for simple time and date keeping
0
 
LVL 2

Expert Comment

by:Philippe
ID: 1222788

You don't need any program to find out who visited your homepage when, just lookup your home page in the logs of the web server.

 Philippe

0
 

Author Comment

by:ccst
ID: 1222789
Edited text of question
0
 
LVL 1

Expert Comment

by:skyflash
ID: 1222790
An applet or a java-script can't save anything because that is an security violation. Java applications can save data, but you can't include an application in your web page the solution is to use cgi.

/Kenneth Boman
0
 
LVL 3

Accepted Solution

by:
EricKaplan earned 10 total points
ID: 1222791
As far as I can see you have two options (Java applet security prevents applet writing to files, etc.):

1) Write a java applet which connects to your host, and sends data to a local database (via JDBC) - a bit complicated

2) Write a CGI script that does that (if you have CGI permission on your server) - a lot more easier

-Eric.

You might want to try one of the available (free) CGI counters (even mine ;-) )
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to parse custom JSON to POJO java 4 73
mockito example issue 8 72
VB Script to add site to Java Exception List 4 76
Way to decrease size of apk file 9 66
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question