Monday, June 8, 2009

J2EE Introduction

Web clients, Application Clients.

Web clients - browser

Application Clients
standalone client application for handling tasks such as system or application
administration.
For example, a web-based banking application might use an application client to
manually administer customers and accounts.
This capability is useful in the event the site becomes inaccessible for any
reason or a customer prefers to communicate things like changes to account
information by phone.

Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed systems

HTTP is a request/response standard of a client and a server. A client is the end-user, the server is the web site. The client making a HTTP request—using a web browser, spider, or other end-user tool—is referred to as the user agent. The responding server—which stores or creates resources such as HTML files and images—is called the origin server.

GET
If a request is made from a html form the GET method can be specified with the method attribute.
POST
If a request is made from a html form the POST method can be specified with the method attribute.
HEAD
HEAD is similar to GET, but returns only the header.
PUT
DELETE
TRACE
OPTIONS

Web Application:
web application generates interactive web pages containing various types of markup language (HTML, XML, and so on) and dynamic content in response to requests

programming model
server-side runtime support
deployement support

J2EE specification:
Java Servlets & JSP
Web Container - is essentially a Java runtime
packaging structure

The Java 2 Platform, Enterprise Edition (J2EE) specification is the standard for developing, deploying, and running enterprise applications.

(Application clients provide a framework on which application code runs, so that your client applications can access information on the application server.

For example, an insurance company can use application clients to help offload work on the server and to perform specific tasks. Suppose an insurance agent wants to access and compile daily reports. The reports are based on insurance rates that are located on the server. The agent can use application clients to access the application server where the insurance rates are located.)

Java Servlet technology was created as a portable way to provide dynamic, user-oriented content.
JavaServer Pages (JSP) technology provides a simplified, fast way to create dynamic web content. JSP technology enables rapid development of web-based applications that are server- and platform-independent.
Deployment descriptor describes how a web application or enterprise application should be deployed. They help to manage web applications once they are deployed.

J2EE Application server
the term application server sometimes refers to a J2EE or Java EE 5 application server. Among the better known Java Enterprise Edition application servers are WebSphere Application Server and WebSphere Application Server Community Edition (IBM), Sybase Enterprise Application Server (Sybase Inc), WebLogic Server (Oracle), JBoss (Red Hat), JRun (Adobe Systems), Apache Geronimo (Apache Software Foundation), Oracle OC4J (Oracle), Sun Java System Application Server (based on GlassFish Application Server)(Sun Microsystems), SAP Netweaver AS (ABAP/Java) (SAP), and Glassfish Application Server.

Web container built into web servers
Ex: Jakarta Tomcat - pure web server
- it includes a webserver along with a web container

[[ The term web server can mean one of two things:
A computer program that is responsible for accepting HTTP requests from clients (user agents such as web browsers), and serving them HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects (images, etc.).
A computer that runs a computer program as described above. ]]

Web container in a separate runtime
Apache, Microsoft IIS (Internet Information Services)- requires Java runtime to run servlets, and a web server plug-in to integrate the Java runtime with the web server.

commercially availabe servlet/JPS engine - JRun , ServletExec

The Structure of Web Application
The contents of the WEB-INF directory are:

The /WEB-INF/web.xml deployment descriptor.

The /WEB-INF/classes/ directory for servlet and utility classes. The classes in this directory must be available to the application class loader.

The /WEB-INF/lib/*.jar area for Java ARchive files. These files contain servlets, beans, and other utility classes useful to the Web application. The Web application class loader must be able to load classes from any of these archive files.

No comments: