{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Building Internet Applications

Building Internet Applications - Building Internet...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Building Internet Applications
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Outline Java Servlets JSP ASP PHP
Background image of page 2
Java Servlets A Java servlet is a server-side application written in Java language It can dynamically generates HTML pages JVM (Java Virtual Machine) and the package javax.servlet is needed in order to run a Java Servlet Java servlets are very similar to CGI scripts. BUT servlets are platform independent, and much more… thread-safe, secure, portable
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Usage of Java Servlets Handling HTTP client requests Capable of serving multiple clients concurrently Allow collaboration between people (e.g. conferencing) Forwarding requests Forward requests to other servers and servlets, to balance load among several servers
Background image of page 4
Architecture Servlet is the interface which all servlets will implement. We have two more abstract classes Usually, we implement our own servlets program by extending HttpServlet class Servlet GenericServlet HttpServlet MyServlet
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
API of Java Servlets Methods in the HttpServlet class that handle client requests take two arguments: An HttpServletRequest object, which encapsulates the data from the client. It provides access to HTTP header data and obtain the arguments that the client sent as part of the request. An HttpServletResponse object, which encapsulates the response to the client. It returns data to the user by Writer (plain text) or ServletOutputStream (binary).
Background image of page 6
API of Java Servlets The methods to which the service method delegates HTTP requests include, doGet, for handling GET, conditional GET, and HEAD requests doPost, for handling POST requests doPut, for handling PUT requests doDelete, for handling DELETE requests
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
API of Java Servlets Servlets have special features available through the Servlet API classes, such as session and cookie management Session tracking is a mechanism that servlets use to maintain state about a series of requests from the same user across some period of time. get data from the HttpSession object Cookies are used to access the state-information associated with the user get data from the Cookie object
Background image of page 8
Servlet life cycle init() destroy() service() only call once Created in a New Threads to dispatch actions only call once doGet() doPost() passing a request and response object to correpesonding process doHead()
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Tomcat 5.5 implements a new servlet container (called Catalina) that is based on completely new architecture. The 5.5 release implements the Servlet 2.4 and JSP 2.0 specifications. http://tomcat.apache.org/
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 32

Building Internet Applications - Building Internet...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online