GenericServlet defines a generic, protocol-independent servlet that uses the service() method to handle requests. HttpServlet extends GenericServlet to define an HTTP protocol specific servlet that uses doGet and doPost methods to handle requests. Servlets follow a lifecycle of initialization, service, and destruction when loaded and unloaded from the servlet container.
JSP technology has facilitated the segregation of the work of a Web designer and a Web developer.
A Web designer can design and formulate the layout for the Web page by using HTML.
On the other hand, a Web developer working independently can use java code and other JSP specific tags to code the business logic.
The simultaneous construction of the static and dynamic content facilitates development of quality applications with increased productivity.
jsp implicit objects (predefined java objects)
jsp implicit objects are java objects that the jsp container makes available to developers in each page so that developer can call them directly without being explicitly declared......
there are 9 pre defined objects in jsp... which are being discussed in this ppt with diagram representation and fewer points..... not full information in slides ... just prepared for presentation purpose.... so u have to do the research work from internet and you tube.....
this ppt is self prepared and taken reference form you tube
This Presentation shows the working of Java RMI technology, it's advantage over RPC, it's class hierarchy API and finally implementation of Factorial program using Java RMI.
JSP technology has facilitated the segregation of the work of a Web designer and a Web developer.
A Web designer can design and formulate the layout for the Web page by using HTML.
On the other hand, a Web developer working independently can use java code and other JSP specific tags to code the business logic.
The simultaneous construction of the static and dynamic content facilitates development of quality applications with increased productivity.
jsp implicit objects (predefined java objects)
jsp implicit objects are java objects that the jsp container makes available to developers in each page so that developer can call them directly without being explicitly declared......
there are 9 pre defined objects in jsp... which are being discussed in this ppt with diagram representation and fewer points..... not full information in slides ... just prepared for presentation purpose.... so u have to do the research work from internet and you tube.....
this ppt is self prepared and taken reference form you tube
This Presentation shows the working of Java RMI technology, it's advantage over RPC, it's class hierarchy API and finally implementation of Factorial program using Java RMI.
Servlet is java class which extends the functionality of web server by dynamically generating web pages.
Servlet technology is used to create Dynamic web application. Servlet technology is robust and scalable. init() and service() methods are more important in life cycle of a servlet. doGet() and doPost() are methods used under service() method.
This presentation is about Spring MVC. Topics covered in this session are:
1. HTTP Servlet
2. What is Spring MVC?
3. MVC Architecture
4. Request Processing Workflow in Spring MVC
5. Spring Web Application Context
6. Spring MVC Configuration
7. Important Annotations
This ppt gives a general idea about the multithreading concepts in the java programming language. hope you find it useful
P.S :
sorry there is a correction in one of the slides
where i have entered implements thread
it is wrong it is actually implements Runnable
thank you!
To view recording of the webinar please use below URL:
http://wso2.com/library/webinars/2015/09/service-oriented-architecture/
This session focuses on
Key architecture goals of SOA
How these can benefit business efficiencies
Popular methods of SOA realization such as web services its standards
This presentation gives introduction to ADO.Net.
Basic introduction to connected & Disconnected architecture.
and explain the each every component in Ado.net
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Edureka!
**** Java Certification Training: https://www.edureka.co/java-j2ee-soa-training ****
This Edureka tutorial on “Java Collections” will talk about the complete hierarchy of Collections Frameworks in Java. It will walk you through the various fundamentals of collections like Lists, Queue, Sets, Interfaces etc. Through this tutorial you will learn the following topics:
Java Collection Framework
Collection Framework Hierarchy
Interfaces
List
Queue
Set
Check out our Java Tutorial blog series: https://goo.gl/osrGrS
Check out our complete Youtube playlist here: https://goo.gl/gMFLx3
Servlet is java class which extends the functionality of web server by dynamically generating web pages.
Servlet technology is used to create Dynamic web application. Servlet technology is robust and scalable. init() and service() methods are more important in life cycle of a servlet. doGet() and doPost() are methods used under service() method.
This presentation is about Spring MVC. Topics covered in this session are:
1. HTTP Servlet
2. What is Spring MVC?
3. MVC Architecture
4. Request Processing Workflow in Spring MVC
5. Spring Web Application Context
6. Spring MVC Configuration
7. Important Annotations
This ppt gives a general idea about the multithreading concepts in the java programming language. hope you find it useful
P.S :
sorry there is a correction in one of the slides
where i have entered implements thread
it is wrong it is actually implements Runnable
thank you!
To view recording of the webinar please use below URL:
http://wso2.com/library/webinars/2015/09/service-oriented-architecture/
This session focuses on
Key architecture goals of SOA
How these can benefit business efficiencies
Popular methods of SOA realization such as web services its standards
This presentation gives introduction to ADO.Net.
Basic introduction to connected & Disconnected architecture.
and explain the each every component in Ado.net
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...Edureka!
**** Java Certification Training: https://www.edureka.co/java-j2ee-soa-training ****
This Edureka tutorial on “Java Collections” will talk about the complete hierarchy of Collections Frameworks in Java. It will walk you through the various fundamentals of collections like Lists, Queue, Sets, Interfaces etc. Through this tutorial you will learn the following topics:
Java Collection Framework
Collection Framework Hierarchy
Interfaces
List
Queue
Set
Check out our Java Tutorial blog series: https://goo.gl/osrGrS
Check out our complete Youtube playlist here: https://goo.gl/gMFLx3
Diseño y validacion GUI con java usando NetbeansEmerson Garay
Guía básica para empezar a diseñar una Interfaz Gráfica de Usuario (IGU) y la validación de los datos ingresados por el usuario, por medio del Lenguaje de programación Java y utilizando el IDE NetBeans.
Slides del taller homonimo dictado durante las Jornadas del Sur 2009, en Bahía Blanca, Argentina, los días 15 a 17 de Agosto de 2009.
El taller se centró en enseñar lo básico del funcionamiento de una computadora, y como se llega hoy día a los lenguajes de alto nivel. Luego, se explicaron los conceptos básicos de la programación utilizando el lenguaje Java. Finalmente, se dio un vistazo a algunas aplicaciones orientadas a la enseñanza de Java en colegios secundarios, como Alice, BlueJ y Greenfoot
Http Server Programming in JAVA - Handling http requests and responsesbharathiv53
This ppt contains HTML forms and CGI; HTTP; Servlet Programming; The Life Cycle of a
Servlet; Using Tomcat for Servlet Development; A simple Servlet;
deployment of simple servlets, web server (Java web server / Tomcat/ Web
logic) The Servlet API; The Javax.servlet Package; Reading Servlet
Parameter; The Javax.servlet.http package; Handling HTTP Requests and
Responses, HTTP GET and POST methods, Using Cookies; Session
Tracking
Server side programs can be written using different server-side technologies , such as Common Gateway Interface (CGI) , Active Server Pages (ASP) and Servlets.
CGI scripts are written in C , C++ or perl programming languages .
In case of an application server using CGI script to process client request , the server creates a separate instance of the CGI script to process the request.
As a result, the efficiency of the server is affected when there is large number of concurrent requests.
9. Differences between Generic and Http
Servlet
• javax.servlet.GenericServlet
Signature: public abstract class GenericServlet
extends java.lang.Object implements
Servlet, ServletConfig, java.io.Serializable
10. javax.servlet.GenericServlet
Signature:
public abstract class GenericServlet extends java.lang.Object
implements Servlet, ServletConfig, java.io.Serializable
• GenericServlet defines a generic, protocol-independent servlet.
• GenericServlet uses service() method to handle request
• GenericServlet gives a blueprint and makes writing servlet easier.
• GenericServlet provides simple versions of the lifecycle methods
init and destroy and of the methods in the ServletConfig interface.
• GenericServlet implements the log method, declared in the
ServletContext interface.
• To write a generic servlet, it is sufficient to override the abstract
service method.
11. javax.servlet.http.HttpServlet
Signature:
public abstract class HttpServlet extends GenericServlet
implements java.io.Serializable
• http is protocol dependent
• HttpServlet defines a HTTP protocol specific servlet.
• HttpServlet uses doGet and doPost methods to handle
requests.
• HttpServlet gives a blueprint for Http servlet and makes
writing them easier.
• HttpServlet extends the GenericServlet and hence inherits
the properties GenericServlet.
12. Package javax.servlet.http
Interface Summary
Extends the ServletRequest interface to provide request
HttpServletRequest
information for HTTP servlets.
Extends the ServletResponse interface to provide HTTP-
HttpServletResponse
specific functionality in sending a response.
Provides a way to identify a user across more than one page
HttpSession request or visit to a Web site and to store information about
that user.
Objects that are bound to a session may listen to container
HttpSessionActivationListener events notifying them that sessions will be passivated and
that session will be activated.
This listener interface can be implemented in order to get
HttpSessionAttributeListener notifications of changes to the attribute lists of sessions
within this web application.
Causes an object to be notified when it is bound to or
HttpSessionBindingListener
unbound from a session.
Deprecated. As of Java(tm) Servlet API 2.1 for security
HttpSessionContext
reasons, with no replacement.
Implementations of this interface are notified of changes to
HttpSessionListener
the list of active sessions in a web application.
13. Class Summary
Creates a cookie, a small amount of information sent by a servlet
Cookie to a Web browser, saved by the browser, and later sent back to
the server.
Provides an abstract class to be subclassed to create an HTTP
HttpServlet
servlet suitable for a Web site.
Provides a convenient implementation of the HttpServletRequest
HttpServletRequestWrapper interface that can be subclassed by developers wishing to adapt
the request to a Servlet.
Provides a convenient implementation of the
HttpServletResponseWrapper HttpServletResponse interface that can be subclassed by
developers wishing to adapt the response from a Servlet.
Events of this type are either sent to an object that implements
HttpSessionBindingListener when it is bound or unbound from a
HttpSessionBindingEvent session, or to a HttpSessionAttributeListener that has been
configured in the deployment descriptor when any attribute is
bound, unbound or replaced in a session.
This is the class representing event notifications for changes to
HttpSessionEvent
sessions within a web application.
HttpUtils Deprecated. As of Java(tm) Servlet API 2.3.
14. Generic Servlet
• javax.servlet
Class GenericServlet
• java.lang.Object javax.servlet.GenericServlet
All Implemented Interfaces:
java.io.Serializable, Servlet, ServletConfig
15. import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
public class GenericServletExample extends GenericServlet {
public void init()
{ log("inside init() method"); }
public void service(ServletRequest request, ServletResponse response)
throws ServletException, IOException
{ log("Handling request");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.write("<html><head><title>GenericServle example</title></head>");
out.write("<body><h1>GenericServlet: Hallo world
</h1></body></html>");
out.close(); }
public void destroy()
{ log("inside destroy() method"); } }
16. HttpServlet
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Hello extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.println("<h1>hello</h1>");
out.println("</body>");
out.println("</html>");
}
}
19. Servlet Life Cycle
• A servlet is basically a small Java program that
runs within a Web server.
• It can receive requests from clients and return
responses.
20. • The whole life cycle of a servlet breaks up into 3
phases:
• Initialization: A servlet is first loaded and initialized
usually when it is requested by the corresponding
clients.
• Service: After initialization, the servlets serve clients
on request, implementing the application logic of
the web application they belong to.
• Destruction: When all pending requests are
processed and the servlets have been idle for a
specific amount of time, they may be destroyed by
the server and release all the resources they
occupy.
21. More specifically, the behavior of a servlet is described in javax.servlet.Servlet
interface, in which the following methods are defined:
• public void init(ServletConfig config) throws ServletException
This method is called once when the servlet is loaded into the servlet
engine, before the servlet is asked to process its first request.
The init method has a ServletConfig parameter. The servlet can read its
initialization arguments through the ServletConfig object. How the initialization
arguments are set is servlet engine dependent but they are usually defined in a
configuration file.
• public void service(ServletRequest request, ServletResponse response) throws
ServletException, IOException
This method is called to process a request. It can be called zero, one or many
times until the servlet is unloaded.
Once a servlet is loaded, it remains in the server’s memory as a single object
instance.
• public void destroy()
This method is called once just before the servlet is unloaded and taken out
of service.
22. The following servlet presents information about how many times it has been
accessed:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SimpleCounter extends HttpServlet {
int count = 0;
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
count++;
out.println("Since loading, this servlet has been accessed " +
count + " times.");
}
}
23. import java.io.*; import javax.servlet.*; public class
HelloServlet extends GenericServlet {
public void init ( ServletConfig config ) {
super.init ( config ); } public void service (
ServletRequest req, ServletResponse res ) throws
ServletException, IOException {
PrintStream out = new PrintStream (
res.getOutputStream ( ) ); out.println ( "Hello,
World!" ); } public void destroy ( ) {
super.destroy ( ); }
}