11-01-2013, 03:28 PM
PRESENTATION ON ADVANCE JAVA
[attachment=46756]
Advance java-Introduction
Java is a programming language originally developed by James Gosling at sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform.
The difference between core and advance java is that the core java is the fundamental for java that will be used in any java technology without this no one can jump on any advance java technology. Where as advance java is specialisation in some domain, such as networking, web, DCOM or database handling
Servlet Class hierarchy
The javax.servlet.Servlet interface defines the life cycle methods such as init( ), service( ) and destroy( ).
The web container invokes the init( ), service( ) and destroy( ) methods of a servlet during its life cycle methods.
Init( )- initialization of servlet
Service( )-allow a servlet to process a client request.
Destroy( )-removing a servlet instance from the service.
Creating the servlet
Following tasks is to be performed to create a servlet:
Code the servlet- For this we need to extend a class from the HttpServlet interface.
Compile and package the servlet- compile to generate the servlet class file and for package we need to create a deployment descriptor.
Deploy the servlet as a Java EE application.
Access the servlet from a browser.
Types of events
The various events that are generated during the life cycle of a servlet are:
Servlet request events- These are related to the changes in the request object associated with a web application.
Servlet context events- These are related to the changes in the context of a web application.
HTTP session events: These are related to the changes in the session object of a servlet application.