Tag-Archive for ◊ Java ◊

Install Java on Linux Platform
Sunday, September 28th, 2008 | Author: Martin

Download the JDK from http://java.sun.com/j2se/1.5.0/download.jsp
(A)  install jdk by running the RPM or bin file.

Installation Instructions

Install formats – JDK 5.0 is available in two installation formats.

  • Self-extracting Binary File – This file can be used to install the JDK in a location chosen by the user. This one can be installed by anyone (not only root users), and it can easily be installed in any location. As long as you are not root user, it cannot displace the system version of the Java platform suppled by Linux. To use this file, see Installation of Self-Extracting Binary below.
  • RPM Packages – A rpm.bin file containing RPM packages, installed with the rpm utility. Requires root access to install, and installs by default in a location that replaces the system version of the Java platform supplied by Linux. To use this bundle, see Installation of RPM File below.

Choose the install format that is most suitable to your needs.

more…

Thread Safety in JSP & Servlet
Sunday, September 28th, 2008 | Author: Martin

You can thread safe your jsp (java server pages) pages in two ways

1. By implementing the SingleThreadModel interface.

This is done by adding the directive to your jsp page

<%@ page isThreadSafe=”false” %>

Within your jsp page.

When you implement SingleThreadModel interface instead of a single instance of the servlet generated for your jsp page loaded in memory, jsp engine creates new instance of that jsp page for each client request.
but avoid this method because, this methods has some performance issue and there are many pitfalls.

2. By using synchronized block or synchronized method

more…

Technorati Profile