February 5, 2000

The 19th Common Programming Trap in MTS

have received a lot of feedback from my first two articles about common programming traps in MTS, which were published at VB-2-The-Max in December 1999. Perhaps there are a million experienced MTS programmers after all? 😉What makes me even happier is that the feedback wasn’t only numerous, it was very

Exert Control Over Serialization

Java gives you control over the serialization process through the java.io.Externalizable interface. The java.io.Externalizable interface extends the java.io.Serializable interface by adding two methods: public void writeExternal(ObjectOutput out) public void readExternal(ObjectInput in) These methods are automatically called during serialization and de-serialization. Therefore, by providing code for these methods, you can implement

Limit Your App To One Instance

How can we make sure that only one instance of our Java application is running on a machine? Java does not provide the means of finding out if another instance of our app is running. And, sometimes, we may really want to limit the user of our app to only

Set Browser Window As Parent Of Modal Dialog

Sometimes, it is useful for an applet to launch a modal dialog whose parent is the browser window containing the applet. This is so when we’d like to get some data from a user via a dialog, and we’d like the dialog to always sit on top the browser window.

Hit Counter Servlet

Sometimes, it is extremely useful to know the number of times a Web page is hit. This is especially so if a web site depends on usage statistics in order to determine peak access times. It is fairly simple to count the hits using a servlet. As we know, when

Declaring Global Variables in Java

If you are coming from C or C++ background, you must miss declaring Global variables in Java. You can get the same functionality in Java by declaring a class and making variables public and static. Here is the Code: public class GlobalDataStore {public static long globalData = 0;} Other classes