Powered by Blogger.

Basic Struts Login Application

>> Sunday, December 18, 2011

 This is our first Application on Struts for Beginners. Before going to start our application go through the Struts flow and architecture.

These are the required files to Develop Struts Login Application:
  1. register.jsp
  2. success.jsp
  3. failure.jsp
  4. RegisterAction.java
  5. RegisterForm.java
  6. struts-html.tld
  7. web.xml
  8. struts-config.xml
Project Structure:
Basic Struts Login Application Project Structure

Create the jsp files first what you want to display as a home page and resultant pages.

Prime Number Logic

>> Sunday, December 11, 2011

The Prime Number program logic is simple but some times we can't catch immediately. In many interviews candidates will discuss each other about this logic. Here given as simply to understand the main logic.

In this program we use two 'for' loop. For loop will start from 1 to entered number. And another loop will start and divide it from 2 to less than those number. If number is divided by any number that means it is not prime otherwise prime number.

In this first for look the values repeat up to the given number 'num'. After it check the prime number logic.
The program given below.

How does the ternary Operator Works?

>> Tuesday, November 15, 2011

The Ternary Operator contains three operands with
  "? :". Based on the return type it will give the value.

operand1 ? operand2 : operand3

Ternary Operator Syntax:

boolean expression ? value1 : value2 ;

The first operand is a boolean expression; if the expression is true then the value of the second operand is returned otherwise the value of the third operand is returned:

Here if operand1 is true, operand2 is returned.

operand1 must be a boolean type

JSP Tag Libraries in Breif

>> Sunday, October 30, 2011

You have many options when it comes to generating dynamic content inside the JSP page.

These options are as follows :
  • Scripting elements calling servlet code directly
  • Scripting elements calling servlet code indirectly (by means of utility     classes)
  • Beans
  • Servlet/JSP combo (MVC)
  • MVC with JSP expression language
  • Custom tags

1.1. MVC - Architecture - 1

>> Wednesday, October 19, 2011

 Web Application Devolopment Models.

Model - 1 Architecture :

Model 1 architecture based web application development is outdated approach of developing web applications. Now a days most of the companies are using MVC architecture to develop the web application. It has become industries defector standard to develop the web applications.

Model 1 architecture based web application multiple web resources will be there but all these web resources will be developed either by using Servlet technology or by using JSP technology.

Using Naming Conventions in Java

>> Tuesday, October 18, 2011

What Is a Naming Convention ?

A naming convention is a rule to follow as you decide what to name your identifiers (e.g. class, package, variable, method, etc..).

Why Use Naming Conventions ?

Different Java programmers can have different styles and approaches to the way they program. By using standard Java naming conventions they make their code easier to read for themselves and for other programmers. Readability of Java code is important because it means less time is spent trying to figure out what the code does, leaving more time to fix or modify it.

Using Debug Tag with an Example

>> Thursday, October 13, 2011


In this article we explained that to send the JSP content of the tag body to the client, one need only call the getJspBody().invoke(null) method inside the doTag method of the tag handler class.

This simplicity allows us to easily create tags that output their bodies conditionally. This functionality can be achieved by simply surrounding the getJspBody().invoke(null) invocation within an if statement.

In this section, we present an example of a custom tag that conditionally outputs its tag body. It's quite often the case when the output of the JSP page is something other than what you expected. In such a case, it's useful to have the option of seeing some debugging information right on the page without having to resort to embedding System.out.print statements throughout the page.

MultiThreading or MultiTasking

>> Saturday, October 8, 2011

Multithreading / MultiTasking:

Let us assume a class containing three functions named as fun1,fun2 and fun3. If all are called once it may take more time to execute. 

In the above example fun2(), fun3() will be executed only after the complete execution of fun1().
Suppose fun1() is performing any input/output operations then at that time processor will be in the ideal state. If input/output operations take 60sec and also fun2() and fun3() will not be executed until 60sec are completed. To overcome this disadvantage the concept of multitasking is used.

There are two types of multitasking techniques.

                1.Process based multitasking
                2.Thread based multitasking


Java program to print word for the given number

Converting a number to characters or to words as readable format in text will be done easily using arrays in java. Based on the given number we can write our logic. But here i am taking the number below to 10000. So we can complete our program easily. But sure, you will understand the logic. It is simple.using Fibonacci logic , using modulo operator and divider operator we can completer our program. This is important interview question and some of like, Reverse an array, matrix addition, matrix multiplication using arrays and prime number logic these are important for the java interviews.
Convert number to Word or Characters_JavabynataraJ
In this program we have to create two arrays one is ones array with the words of one,two,three.....nineteen. Then create another array with tens array contains ten,twenty,.....ninety.
Then write the given logic to convert a number into character.

What is JIRA. How to Work with JIRA ?

>> Friday, September 30, 2011

About JIRA:

JIRA is a proprietary issue tracking product, developed by Atlassian, commonly used for bug tracking, issue tracking, and project management. The product name, JIRA, is not an acronym but rather a truncation of "Gojira", the Japanese name for Godzilla.It has been developed since 2004.

Architecture:

JIRA is written in Java and uses the Pico inversion of control container, Apache OFBiz entity engine, and WebWork 1 technology stack. For Remote Procedure Calls (RPC), JIRA supports SOAP, XML-RPC and REST.

How to checkin the code into CVS using WSAD

>> Saturday, September 17, 2011

The few steps to checkin your code in to CVS.

#1). Select your file in the workspace to checkin and right click on the file and select Team then Synchronization




How to Change Variable values in Debugging using WebSphere

>> Monday, September 12, 2011

While running our application we can change the variable values as per our requirement and results for testing purpose.

1. First we have to add break points at perticular positions in WebSphere ApplicationDeveloper(WSAD).

 

Convert String to Character Array Example

To Convert a String into Character we should have some methods to convert.Java having the methods are toCharArray( ) and charAt( ) .By using these we can convert. But in our program by using toCharArray( ) method is enough.

Convert String to Character Array Example This example shows how to convert a given String object to an array of character


Take a class named as 'Str2Char'

How to switch Workspace in WebSphere Studio Application Developer(WSAD)

>> Monday, August 22, 2011


Actually with WSAD v5.1.2 version we don’t find ‘SwitchWorkspace’ option like MyEclipse and with this feature that come with RAD 6.0.

However, we can change the workspace by changing the workspace directory which WSAD prompts on starting the workbench.

If, we checked the 'Use this workspace as default' option, then we will have to go to the command prompt and type in the following:

'C:\WSAD\v512\wsappdev -setworkspace'. (Usually WSAD is stored here).

If it is in a different location on your PC, then type in \wsappdev –setworkspace


What is the difference between Iterator and Listiterator ?

>> Saturday, August 20, 2011


There are two Differences are there :

1. We can use Iterator to traverse Set and List and also Map type of Objects. But List Iterator can be used to traverse for List type Objects, but not for Set type of Objects.

That is, we can get a Iterrator object by using Set and List, see here :

 By using Iterator we can retrieve the elements from Collection Object in forward direction only.

Methods in Iterator :

1. hashNext()
2. next()
3. remove()



Iterator ite = Set.iterator();
Iterator ite = List.iterator();

How to create a Repository in CVS

>> Friday, August 19, 2011


CREATE a REPOSITORY

First off, you need to create a repository directory on some stable, trustworthy host. This directory is probably called something like
  • /opt/CVS
  • /usr/local/CVS
  • /mnt/CVS
You get the idea. Create this directory.
You need to set the envar CVSROOT to the name of that directory. For now, let's not worry about multiple repositories; we'll just note that by changing the envar you can make CVS look in one or another of several repositories, should you happen to have several.
There's a script cvsinit that came with CVS. You should use this script to help initialize your new repository. As the CVS INSTALL guide says, "There are many ways to customize CVS for your site. Read the cvs(5) manual page when you get the chance." I couldn't put it better myself.

Now we'll assume that you survived all of the above, and that you have a properly configured repository.






HibernateSearch in Action ebook Download

>> Thursday, June 30, 2011


Enterprise and web applications require full-featured, "Google-quality" search capabilities, but such features are notoriously difficult to implement and maintain. Hibernate Search builds on the Lucene feature set and offers an easyto- implement interface that integrates seamlessly with Hibernate-the leading data persistence solution for Java applications.

Hibernate Search in Action introduces both the principles of enterprise search and the implementation details a Java developer will need to use Hibernate Search effectively. This book blends the insights of the Hibernate Search lead developer with the practical techniques required to index and manipulate data, assemble and execute search queries, and create smart filters for better search results. Along the way, the reader masters performance-boosting concepts like using Hibernate Search in a clustered environment and integrating with the features already in your applications.

Hibernate in Action ebook Download

Hibernate in Action eBook DownloadHibernate practically exploded on the Java scene. Why is this open-source tool so popular? Because it automates a tedious task: persisting your Java objects to a relational database. The inevitable mismatch between your object-oriented code and the relational database requires you to write code that maps one to the other. This code is often complex, tedious and costly to develop. Hibernate does the mapping for you.

Not only that, Hibernate makes it easy. Positioned as a layer between your application and your database, Hibernate takes care of loading and saving of objects. Hibernate applications are cheaper, more portable, and more resilient to change. And they perform better than anything you are likely to develop yourself.

Sun Certified Programmer & Developer for Java 2 Study Guide ebook Download


The Best Fully Integrated Study System Available--Written by the Lead Developers of Exam 310-065


With hundreds of practice questions and hands-on exercises, SCJP Sun Certified Programmer for Java 6 Study Guide covers what you need to know--and shows you how to prepare--for this challenging exam.
  • 100% complete coverage of all official objectives for exam 310-065
  • Exam Objective Highlights in every chapter point out certification objectives to ensure you're focused on passing the exam
  • Exam Watch sections in every chapter highlight key exam topics covered
  • Simulated exam questions match the format, tone, topics, and difficulty of the real exam

Manning-Struts 2 in Action ebook Download

Product Description


The original Struts project revolutionized Java web development and its rapid adoption resulted in the thousands of Struts-based applications deployed worldwide. Keeping pace with new ideas and trends, Apache Struts 2 has emerged as the product of a merger between the Apache Struts and OpenSymphony WebWork projects, united in their goal to develop an easy-to-use yet feature-rich framework. Struts 2 represents a revolution in design and ease of use when compared to classic Struts. It adds exciting and powerful features such as a plugin framework, JavaServer Faces integration, and XML-free configuration.

Learning Jakarta Struts 1.2 ebook Download

Product DescriptionThis book is designed as a rapid and effective Struts tutorial for Java developers. The book builds a fully-featured web bookstore application incrementally, with each stage described step-by-step. Concepts are introduced simply and clearly as the design and implementation of this sample project evolves.

The emphasis is on rapid learning through clear and well structured examples. This book is written for Java developers planning to develop web applications, who are new to Struts. It expects familiarity with Java, JSP and Servlets to a degree, although more obscure elements are explained. It covers Struts 1.2.

Sun Certified Java Programmer by Kathy Sierra ebook Download

With hundreds of practice questions and hands-on exercises, SCJP Sun Certified Programmer for Java 6 Study Guide covers what you need to know--and shows you how to prepare--for this challenging exam.
SCJP 6 Study Guide by Kathy Sierra-JavabynataraJ
  • 100% complete coverage of all official objectives for exam 310-065
  • Exam Objective Highlights in every chapter point out certification objectives to ensure you're focused on passing the exam
  • Exam Watch sections in every chapter highlight key exam topics covered
  • Simulated exam questions match the format, tone, topics, and difficulty of the real exam
Covers all SCJP exam topics, including:

HeadFirst Servlets and Jsp 2nd Edition ebook Download

HeadFirst Servlets and Jsp 2nd Edition ebook DownloadWant to get to know the latest (J2EE 1.4) versions of Servlets and JSPs so well that you can pass the Sun Certified Web Component Developer (SCWCD) 1.4 exam? No problem! Head First Servlets & JSP will show you how to write servlets and JSPs, what makes the Container tick, how to use the new JSP Expression Language (EL), and much more. You won't just pass the exam, you will truly understand this stuff and be able to put it to work right away.

HeadFirst HTML with CSS and XHTML ebook Download

Tired of reading HTML books that only make sense after you're an expert? Then it's about time you picked up Head First HTML with CSS & XHTML and really learn HTML. You want to learn HTML so you can finally create those web pages you've always wanted, so you can communicate more effectively with friends, family, fans, and fanatic customers.

You also want to do it right so you can actually maintain and expand your web pages over time, and so your web pages work in all the browsers and mobile devices out there. So what are you waiting for? Leave those other dusty books behind and come join us in Webville. Your tour is about to begin.

struts-config.xml in Detail

>> Wednesday, June 29, 2011


The main tags in struts-config.xml are:


<data-sources/>
<form-beans/>
<global-forwards/>
<global-exceptions/>
<action-mappings/>
<controller/>
<message-resources/>
<plug-in/>

The basic example code of struts-config.xml as given below with all tags.

Struts LookupDispatchAction Example Application

>> Tuesday, June 28, 2011

LookupDispatchAction class can group the similar functions in to a single action class by using propeties file and overriding getKeyMethodMap() of HashMap.

In this example we can learn how to group set of userdefined methods in to a single action class.

LookupDispatchAction class extends org.apache.struts.actions.DispatchAction.Our class CalculateAction should extens to LookupDispatchAction.This class does not provide any predefined action methods.The user defined methods will be defined here.

In previous example of DispatchAction class the reqest parameter carry the value of the method directly.But in LookupDispatchAction class the value will be passed to method name using keys and values defining in getKeyMethodMap method.We should override this method in LookupDipatchAction class.This method returns map object with keys and values.

The additional elements required in LookupDispatchAction class:      

Struts ApplicationResource.properties in Detail

>> Thursday, June 23, 2011

Industries standard principle in project development is don't hardcode(typing code) any values in the application that are changable in the future.

To make java,jdbc applications flexible collect driverclass name,url,database username,password details required for jdbc code from outside the application by using the support of properties file.

A file that contains entries in the form of key = value page is called properties file.

abc.properties

What are the Different types of FormBeans in Struts?

There are six types of FormBean classes are available in struts.

They are:
  •     ActionForm
  •     DynaActionForm
  •     ValidatorForm
  •     DynaValidatorForm
  •     ValidatorActionForm
  •     DynaValidatorActionForm

Simple Application using DispatchAction and Tiles with Struts

>> Wednesday, June 22, 2011

In previous DispatchAction example we observed the resultant page is displaying in new page.Now we are doing to display the result within the page using Tiles concept in Struts.
DispatchAction using Tiles Struts_javabynataraj
For Tiles concept design a layout to display Calculate.jsp and result.jsp.Override the result.jsp page with the add.jsp,sub.jsp,mul.jsp,div.jsp pages by defining the definintions in tiles-defs.xml.

Here you have to understand the integration of DispatchAction and Tiles. Normally we forward the pages using forwarding depends on string returned.

Take a look before starting our application, on DispatchAction and Tiles using Struts.

The required files for our Applicatoin:

Struts DispatchAction Example Application

>> Tuesday, June 21, 2011

Struts DispatchAction can group similar action classes into a single action class having different methods.
In this action excluding the execute method we can write our own user defined methods.The parameters are same given by struts framework (mapping,form,request,response).

In this example we will see how to group similar action methods in a single Class like add,sub,mul,div.In a single page we are performing four actions with different buttons.

In our example our Actionclass (CalculateAction) should extends DispatchAction to dispatch the action based on the parameter value of action button.Here we should concentrate how the action is performing.

Simple Struts program Using Tiles

>> Monday, June 20, 2011

Simple Struts program Using Tiles

Welcome to Struts Tiles Component.Tiles is a templating system.It can be used to create a common look and feel for a Web Application.This can be used to  reusable view components.

The main features of Tiles:
  • Inheritance mechanism on definitions
  • Common layouts with overriding mechanism
  • Dynamic page reload based on parameter layout
  • We can load different tiles according to Locale Internationalization(i18N).
  • It is possible to load different Tiles according to a key.
The additional elements to develop Tiles application
  1. layout.jsp 
  2. tiles-defs.xml

Hibernate Interview Questions and Answers - 5

>> Saturday, June 18, 2011

41) What is the difference between sorted and ordered collection in hibernate?


A) sorted collection vs. order collection
sorted collection :-
A sorted collection is sorting a collection by utilizing the sorting features provided by the Java collections framework. The sorting occurs in the memory of JVM which running Hibernate, after the data being read from database using java comparator.
If your collection is not large, it will be more efficient way to sort it.
order collection :-
Order collection is sorting a collection by specifying the order-by clause for sorting this collection when retrieval.
If your collection is very large, it will be more efficient way to sort it .

Hibernate Interview Questions and Answers - 4

>> Friday, June 17, 2011

31) What does it mean to be inverse?

A) It informs hibernate to ignore that end of the relationship. If the one–to–many was marked as inverse, hibernate would create a child–>parent relationship (child.getParent).

32) What do you mean by Named – SQL query?

A) Named SQL queries are defined in the mapping xml document and called wherever required.

Example:

SELECT emp.EMP_ID AS {emp.empid},
emp.EMP_ADDRESS AS {emp.address},
emp.EMP_NAME AS {emp.name}
FROM Employee EMP WHERE emp.NAME LIKE :name

Invoke Named Query :
List people = session.getNamedQuery(“empdetails”).setString(“TomBrady”, name).setMaxResults(50).list();

Hibernate Interview Questions and Answers - 3

>> Thursday, June 16, 2011

21) What role does the Session interface play in Hibernate?

A) The Session interface is the primary interface used by Hibernate applications. It is a single-threaded, short-lived object representing a conversation between the application and the persistent store. It allows you to create query objects to retrieve persistent objects.

Session session = sessionFactory.openSession( );

Session interface role:
* Wraps a JDBC connection
* Factory for Transaction
* Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier

Hibernate Configuration file (hibernate.cfg.xml) in Detail

>> Wednesday, June 15, 2011

Hibernate Configuration file for SQLyog.

Before configuring the properties of hibernate.cfg.xml we should mention the xml schema definitions of hibernate-configurations.The dtd defines the version and everything which is licensed.

To configure with database to our application we should give all the properties related to our database.The given properties of hibernate-configuration.

hibernate.connection.driver_class
hibernate.connection.url
hibernate.connection.username
connection.password
connection.pool_size
hibernate.dialect
show_sql
hibernate.hbm2ddl.auto


Hibernate Interview Questions and Answers - 2

11) Explain about mapping files in Hibernate?

Mapping files forms the core of any database mapping tools. These files contain field to field mapping, usually this mapping occurs between classes and attributes. After mapping files they can be persist to the database. Tags can be used to indicate the presence of a primary key.

12) What is the effect when a transient mapped object is passed onto a Sessions save?


When a session.save( ) is passed to a transient mapped object it makes the method to become more persistent. Garbage collection and termination of the Java virtual machine stays as long as it is deleted explicitly. It may head back to its transient state.

13) Explain about version field?

Application level data integrity constants are important if you are making changes to offline information which is again backed by database. Higher level locking or versioning protocol is required to support them. Version field usage comes at this stage but the design and implementation process is left to the developer.

Hibernate Interview Questions and Answers - 1

>> Tuesday, June 14, 2011

1) Explain about Hibernate?
Hibernate Interview Questions_JavabynataraJ
Hibernate solves problems such as Object Relational impedance mismatch, etc. It is commonly used for object and query service. It helps data base developers develop classes which include inheritance, association, composition and polymorphism. A developer or user can express queries either in HQL or SQL.

2) Explain about the primary feature of Hibernate?

Primary feature of hibernate is to java classes to database tables. Data query and retrieval is also possible with Hibernate. Application portability is a key feature in Hibernate it allows developers to port applications to almost all SQL databases.

Storing username and password using Struts and JDBC

>> Monday, June 13, 2011

Integrating Struts with JDBC is pretty much simple. In real time most of the people work with Hibernate instead of JDBC. Here we can understand using a simple program, how to work using Struts and JDBC.

This is the application to persist the data into database from jsp pages using JDBC and struts.
The required components to develop Struts with JDBC:

Project Structure:

Project Strcture_Struts-JDBC
From the beginning the end user submits the request from JSP form(Login.jsp) to struts based web application.Using struts-html.tld file we generate the html tags in jsp page to read username and password and for submit button.

Can i convert List to Set (or) ArrayList to HashSet ?

>> Friday, June 10, 2011

Yes.We can convert from List to Set.Both are under the same Superclass Collection Interface.So there are more chances to convert.







Actually ArrayList follows the insertion order of elements.When you tried to convert from ArrayList to HashSet it won't preserve the previous order, it may change according to the properties of HashSet.Set won't maintain the order of elements.

Here we are passing the reference of the List to HashSet constructor at the creation of set object.

Set<Object> set = new HashSet<Object>(list);

Can i convert Set into List ?

Yes.we can convert a Set into List.The List and Set both are interfaces having superclass of Collection interface.

Create an object of HashSet which is implemented a Set Interface.Add the objects to the HashSet using add() method.


Set<String> set = new HashSet<String>();
  set.add("username");
  set.add("password");
  set.add("login");

And same Create an object of ArrayList which is implemented a List Interface.Pass the reference object of Set while creating the ArrayList object.

List<String> list = new ArrayList<String>(set);

How to Iterate Map using Generics

>> Thursday, June 9, 2011

Map is an interface.We can iterate the implemented classes from map like TreeMap,HashMap,LinkedHashMap.

Maps do not provide an iterator() method as do Lists and Sets. A Set of either keys (keySet()) or key-value 'Map.Entry' elements (entrySet()) can be obtained from the Map, and one can iterate over that.

Create an object for HashMap and insert the objects in that.

Map<Integer, String> map = new HashMap<Integer, String>();
  map.put(100, "Murali");
  map.put(200, "khaleel");
  map.put(300, "Bhaskar");

AbstractFactory Design Pattern with an Example program

>> Tuesday, May 31, 2011

Creational Patterns - Abstract Factory Pattern

Definition:
  • Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
  • A hierarchy that encapsulates: many possible “platforms”, and the construction of a suite of “products”.
  •  The new operator considered harmful.
Where to use & benefits
  1. Creates families of related or dependent objects like Kit.
  2. Provides a class library of products, exposing interface not implementation.
  3. Needs to isolate concrete classes from their super classes.
  4. A system needs independent of how its products are created, composed, and represented.
  5. Try to enforce a constraint.
  6. An alternative to Facade to hide platform-specific classe.
  7. Easily extensible to a system or a family.
  8. Related patterns include.

Decorator Design Pattern with an Example

>> Monday, May 30, 2011

Definition:
               Attach additional responsibilities or functions to an object dynamically or statically. Also known as Wrapper.
Where to use & benefits:
  1. Provide an alternative to subclassing.
  2. Add new function to an object without affecting other objects.
  3. Make a responsibility easily added and removed dynamically.
  4. More flexibility than static inheritance.
  5. Transparent to the object.
  6. Related patterns include  
Decorative Design Pattern with Example_JavabynataraJ
  •  Adapter pattern, which provides a different interface to the object it adapts, whereas a decorator changes an object's responsibilities,

Factory Design Pattern with a real time Example

>> Friday, May 27, 2011

The Factory design pattern comes under Creational design pattern.

Definition

Provides an abstraction or an interface and lets subclass or implementing classes decide which class or method should be instantiated or called, based on the conditions or parameters given.

Where to use & benefits
  1. Connect parallel class hierarchies.
  2. A class wants its subclasses to specify the object.
  3. A class cannot anticipate its subclasses, which must be created.
  4. A family of objects needs to be separated by using shared interface.
  5. The code needs to deal with interface, not implemented classes.
  6. Hide concrete classes from the client.
  7. Factory methods can be parameterized.
  8. The returned object may be either abstract or concrete object.
  9. Providing hooks for subclasses is more flexible than creating objects directly.
  10. Follow naming conventions to help other developers to recognize the code structure.

Can I have more than one struts-config.xml file for a single Struts application?

>> Thursday, May 26, 2011

Yes! One can have more than one struts-config.xml file for a single Struts application.
You can define different struts-conifg.xml file for different modules in a single web application. It is useful when you are developing a distributed application. But you must enter those struts-config.xml files details in deployment descripter (i.e., web.xml) file.

If you are working with multiple modules in your project, then you can have one configuration file for each modules. Let's say the project has two modules admin and reports. You access the admin screens using the URI admin/admin-module1 and reports using the URI report/report-1. Here the admin and report are two different modules.

Simple Hibernate Example on Inserting Employee details using MySql

>> Wednesday, May 25, 2011

Hibernate is a solution for object relational mapping and a persistence management solution or persistent layer. This is probably not understandable for anybody learning Hibernate.

What you can imagine is probably that you have your application with some functions (business logic) and you want to save data in a database. When you use Java all the business logic normally works with objects of different class types. Your database tables are not at all objects.

Hibernate provides a solution to map database tables to a class. It copies the database data to a class. In the other direction it supports to save objects to the database. In this process the object is transformed to one or more tables.

Difference between ServletContext and ServletConfig

>> Thursday, May 19, 2011

What is the difference between ServletConfig and ServletContext?
ServletContext and ServletConfig both are interfaces.ServletContext is one per application and within the application serveral Servlets will be defined. Each Servlet will be having a ServletConfig object. Even for jsp page.You can understand easily by the image given below.

Difference between ServletConfig and ServletContext_JavabynataraJ


Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2022. All rights reserved.