How to create java maven project in Eclipse?

In this post we will talk about creating java maven project.  Steps involved in creating java maven project. 1. Lunch eclipse. Click “File->New->Maven Project” menu item. 2. In the new maven project dialog, select “create  a simple project” check box and click “Next” button. 3. Give appropriate “Group Id”, “Artifact Id”, “Version” and “Packaging Type”. [...]
Continue reading…

 

ATG Targeting Servlets/Droplets.

ATG framework provides five out of the box targeting droplets/servlets. Refer ATG droplet design and ATG custom droplet to understand more abut ATG droplets. What is targeting? The selection of potential customers to whom a business wishes to sell products or services. A target market is the segment of the population to which you intend [...]
Continue reading…

 

User registration page in ATG using DSPs and Handler.

ATG comes with powerful out of the box components to build e-commerce websites with minimal effort. Today we will create a simple user registration page using DSP tags and ProfileFormHandler Component. Steps to create a user registration page. 1. Import the DSP tab libraries.

2. Import the ProfileFormHandler Component. This is an out of [...]
Continue reading…

 

ATG Generic Session Manager/Session Tracking.

There is a very useful out of the box component named GenericSessionManager in ATG. GenericSessionManager component helps you to track down all session scope objects and it’s state. 1. You can access the GenericSessionManager from the URI given below. (This is part of the ATG dyn admin component browser) http://host:port/dyn/admin/nucleus/atg/dynamo/servlet/sessiontracking/GenericSessionManager/ 2. Once you click on [...]
Continue reading…

 

ATG Composite Repository.

ATG Data anywhere architecture provide capability to map multiple data-store to a single repository. Consider a scenario in which you have only the user-id in the relational database and rest of attributes like name and address are in LDAP server. ATG composite repository will help you in this situation. How to create ATG secure repository? [...]
Continue reading…

 

Serialization and Deserialization in java.

Serialization is the process of converting the state of an object into byte stream. De-serialization allow you to restore the serialized state into another instance of the same type. As you know, only the state of an object can serialized. Behavior is run-time phenomenon and it can’t be converted to a stream. Classes java.io.ObjectOutputStream and [...]
Continue reading…

 

Java Reflection – Invoking Method at Runtime.

Using Java Reflection we can inspect and invoke methods at runtime. This is achieved using a class named java.lang.reflect.Method. There are basically three steps involved in invoking a method using reflection. Create a instance of the given class Prepare the parameters to invoke the method Invoke method using the java.lang.reflect.Method Create a instance of the [...]
Continue reading…

 

How to create and start threads in java?

Unlike many other languages it is simple to create and manage threads in java. Your class can gain the concurrent behavior through either extending java.lang.Thread class or implementing java.lang.Runnable interface. Thread class itself implements Runnable interface, due to the same reason compiler will not force the programmer to give an implementation of run() method if [...]
Continue reading…

 

Invoking constructor using java reflection.

Invoking non parameterized and parameterized constructors in java is possible thru reflection API. This helps the programmers to instantiate classes which are configured in a property file or in database on the runtime. Below given example demonstrate the power of jave reflection API, program creates instances using parameterized and non parameterized constructors. Code snippet to [...]
Continue reading…