Home | Terms and Privacy | Contact Us | Login


Why using Java-servlet? Why not client/server application?

01/02/2003

1. What are Java Servlets?

Servlets are Java technology's answer to CGI programming. They are programs that run on a Web server and build Web pages.


2. What are the Advantage of Servlets?

Java servlets are more efficient, easier to use, more powerful, more portable, and cheaper than traditional CGI and than many alternative CGI-like technologies.

- Efficient. With traditional CGI, a new process is started for each HTTP request. If the CGI program does a relatively fast operation, the overhead of starting the process can dominate the execution time. With servlets, the Java Virtual Machine stays up, and each request is handled by a lightweight Java thread, not a heavyweight operating system process. Similarly, in traditional CGI, if there are N simultaneous request to the same CGI program, then the code for the CGI program is loaded into memory N times. With servlets, however, there are N threads but only a single copy of the servlet class. Servlets also have more alternatives than do regular CGI programs for optimizations such as caching previous computations, keeping database connections open, and the like.

- Convenient. Hey, you already know Java. Why learn Perl too? Besides the convenience of being able to use a familiar language, servlets have an extensive infrastructure for automatically parsing and decoding HTML form data, reading and setting HTTP headers, handling cookies, tracking sessions, and many other such utilities.

- Powerful. Java servlets let you easily do several things that are difficult or impossible with regular CGI. For one thing, servlets can talk directly to the Web server (regular CGI programs can't). This simplifies operations that need to look up images and other data stored in standard places. Servlets can also share data among each other, making useful things like database connection pools easy to implement. They can also maintain information from request to request, simplifying things like session tracking and caching of previous computations.

- Portable. Servlets are written in Java and follow a well-standardized API. Consequently, servlets written for, say I-Planet Enterprise Server can run virtually unchanged on Apache, Microsoft IIS, or WebStar. Servlets are supported directly or via a plugin on almost every major Web server.

Professional overview of Java Servlets from SUN
See the opinon from the networked group of developers and resellers around the world

3. Client/Server Application VS Web Based System


In conclude, web based system is easier for maintanence in long term. And it is the trend of IT. It can be either functioning inside intranet or internet. Suitable for many people accessing the system at the same time, work together and share information.



Hard disk partition
01/12/2003

To partition your computer without deleting the existing partitions, you should use Partition Magic. For DOS user, you should use FDISK.

More details


Backup pc regularly
01/12/2003

Computer backups are important, whether you are a large multinational company, a small business or just a simple home user. You should take care to ensure that your data is backed up regularly (daily if possible) so that you don't lose precious hours of work.
You may lose your important files due to the bad sector on your hard disk, operating system failed to boot up or inflected virus on your computer.


Take regular breaks
01/12/2003

Prolonged computer use can be hazardous to your health.
We (and other more qualified people - like doctors) recommend that you take a break from the computer screen at least once every 45 minutes to relax your eyes and stretch your back and neck.


© Copyright IT Sonic 2003-2006