Month: April 2007

javax.servlets

Life Cycle:lifecycle of a servlet contains the following stages Instantiation: Web container creates an instance of the servlet Initialization: Container calls the instances init() method if not called earlier. Service: If the container has a request for the servlet, it calls the servlet instances service() method. Destroy: Before destroying the instance, the container calls the…

Read More

Rules Engine

Sustaining changing business environment and remaining competitive is one of the biggest challenges faced by organizations today. Changes in competitive factors ultimately result in changes in business rules. Frequent changes to business rules increase the cost of maintenance, enhancement and customization: a problem seen across verticals. This calls for flexibility in administration and maintenance of…

Read More

Apache Struts

Summary Central controller mediates application flow Controller delegates to appropriate handler Handlers are tied to model components Model encapsulates business logic Control forwarded back through the controller to the appropriate view. Controller bundles and routes HTTP request to other objects in framework Controller parses configuration file Configuration file contains action mappings (determines navigation) Controller uses…

Read More

Hibernate

Hibernate is an open source object/relational mapping tool for Java. Hibernate lets you develop persistent classes following common Java idiom – including association, inheritance, polymorphism, composition and the Java collections framework. Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but…

Read More

J2EE Patterns

J2EE Patterns In software engineering, a design pattern is a general repeatable solution to a commonly-occurring problem in software design. A design pattern isn’t a finished design that can be transformed directly into code; it is a description or template for how to solve a problem that can be used in many different situations. Object-oriented…

Read More

XSL or XSLT

1.Test if the value of a certain node is empty Depends what you mean by empty. Contains no child nodes: not(node()) Contains no text content: not(string(.)) Contains no text other than whitespace: not(normalize-space(.)) Contains nothing except comments: not(node()[not(self::comment())]) 2. To match any node with no data. example: <field1>data</field1> <field2> </field2> How do I match field2’s…

Read More

Java Server Pages

· JSP Directives: Page Directive: Define & manipulate a number of important page dependent attributes that affect the whole JSP, & communications these attributes to the JSP container. <%@ page [ language = “java” ] [ extends = “package.class” ] [ import = “package.*” ] [ session = “true | false” ] [ buffer =…

Read More

Enterprise Java Beans

EJB architecture: is a component architecture for the development and deployment of component-based distributed business applications. An application written using the Enterprise JavaBeans architecture is Scalable Transactional Multi-user secure General Restrictions of EJB: EJB development places some restrictions on the developers for better component management and easier service. The restrictions include the following An enterprise…

Read More

java.util

Collection vs List vs Map vs Set Collection List Map Set Duplicate Elements Duplicate Elements No Duplicate Keys No Duplicate Elements Extends Collection Each key can map to 1 value Extends Collection HashMap vs HashTable vs HashSet vs TreeSet vs TreeMap HashMap HashTable HashSet TreeSet TreeMap Implements Map Implements Map Implements Set Implements SortedSet Implements…

Read More

java.thread

Definition A thread is a single sequential flow of control within a program. Runnable is implemented by class Thread. Being active simply means that a thread has been started and has not yet been stopped. Runnable provides the means for a class to be active while not subclassing Thread. A class that implements Runnable can…

Read More