Archive | August, 2008

Closures in Java 7.0

August 4, 2008

1 Comment

What is a closure? Wikipedia says: A closure is a function that is evaluated in an environment containing one or more bound variables.(Free variables which are to be passed to the function).In some languages closures may occur when a function is defined within another function and the inner function refers to the local variables of [...]

email

Inner Classes in Java

August 2, 2008

0 Comments

As we all know what an inner class is so lets try to know few more rules about Inner Classes. Inner classes cannot have static members. only static final variables. Interfaces are never inner. Static classes are not inner classes. Inner classes may inherit static members that are not compile-time constants even though they may [...]

Abstract keyword In Java

August 2, 2008

0 Comments

What is Abstract As we all know,An abstract method declaration introduces the method as a member, providing its signature, return type, and throws clause , but does not provide an implementation. Every subclass of A that is not abstract must provide an implementation for method, or a compile-time error occurs. JLS states: An instance method [...]

JSF Best Practices

August 2, 2008

0 Comments

Here I am documenting some best practices can be followed during JSF project development. Open Source Components 1. Use myfaces or Sun RI. It doesn’t matter which one you use because both comes from Sun. Sun offers myfaces through open-source community. 2. Use richfaces to get rich look quicker. Click here to go to demo [...]

ThreadLocal in Java

August 2, 2008

0 Comments

ThreadLocal is one of the rarely used class in Java. I found it is one of the powerful class in Java on multi-threaded programming. In multi threaded program generally we use session object to track the current users information. These information is passed to various method to retrieve desired value. For example in Struts execute [...]

Why multiple inheritance is not allowed in Java?

August 2, 2008

3 Comments

For long time I had a question “why Sun introduced Interface concept instead of C++ style of multiple inheritance?“. I did googling but many articles and forums talks about difference between abstract class and Interface not why Interface concept required in Java. After extensive search and analysis I came to know the reason behind the [...]

How to install Tomcat 6.0 server?

August 2, 2008

3 Comments

This article explains how to install the tomcat 6.0 server in your desktop. This is pretty simple and since moss of the java beginners find its difficult to get started with the web development. Because tomcat is the mostly recommended web server for learning JSP and Servlets basics. Tomcat is also the Reference Implementation(RI) for [...]

Servlet Life Cycle

August 1, 2008

1 Comment

Before start writing the servlet, it is important to know the life cylce of every servlet instance created. Read What is Servlet? tips to know about the servlet basics. Servlet Life Cycle Methods The following are the life cycle methods of a servlet instance: init() service() destroy() We will look into the each method in [...]

SAR (Service Archive) file in JBoss

August 1, 2008

3 Comments

This tips explains how to create and deploy the SAR file in the JBoss application server. SAR files are only used in the JBoss application server. It cannot be used in the other application server environments. Before looking into creating a SAR file, first let you know what is SAR file. What is SAR file? [...]