Web Servlet Specification - Yash-777/SteamingServlet GitHub Wiki

In computing, Common Gateway Interface offers a standard protocol for web servers to execute programs that execute like Console applications running on a server that generates web pages dynamically.


This is the project for the Java EE Platform specification. The Java EE Platform specification is the umbrella specification that defines the Java EE platform. The platform specification doesn’t define the Java EE APIs directly, but rather includes them by reference to other Java specifications and defines how they all fit together in the overall Java EE platform. The platform specification also defines other attributes of the platform such as security, deployment, transactions, and interoperability.

Java Servlet Technology Overview

Servlets are the Java platform technology of choice for extending and enhancing Web servers. Servlets provide a component-based, platform-independent method for building Web-based applications, without the performance limitations of CGI programs.
         Servlets have access to the entire family of Java APIs, including the JDBC API to access enterprise databases. Servlets can also access a library of HTTP-specific calls and receive all the benefits of the mature Java language, including portability, performance, reusability, and crash protection.


Java Servlet is the foundation web specification in the Java Enterprise Platform. Developers can build web applications using the Servlet API to interact with the request/response workflow. This project provides information on the continued development of the Java Servlet specification.

Java Servlets is a JCP Standard technology for interacting with the web on the Java EE platform.


A server is a computer that serves up applications. Any computer can be turned into a server if you install server software and connect the computer to the Internet.

A Java EE application server, also known as a Java EE container, is any server that is fully compliant with the J2EE or Java EE platforms. Unlike a regular web server, an application server can run full enterprise applications, EJB modules, and web services. It can also manage transactions of persistent entity objects and communicate with databases.


This section provides a list of API specifications which are implemented by Apache Tomcat.

The specifications are developed and maintained by the Java Community Process (JCP). The members of the JCP are coming from software industry, other organizations like the Apache Software Foundation (ASF), educational institutions but include also individual (personal) members.
         Each specifications starts its life as a so-called Java Specification Request JSR. The JSRs are also known by the unique number they receive once the specification process starts. On the web site of the JCP you can find an overview page for each spec, and a separate download page. The download page lists various stages of each spec reflecting the development process of JCP specs. Examples are "Early Draft Review", "Public Final Draft" and "Final Release". You would like to make sure that you always access the latest documents.

Different Tomcat versions implement different versions of the specifications (see main site, wiki).

Servlet Spec JSP Spec EL Spec WebSocket Spec JASPIC Spec Apache Tomcat Version Supported Java Versions
4.0 2.3 3.0 1.1 1.1 9.0.x 8 and later
3.1 2.3 3.0 1.1 1.1 8.5.x 7 and later
3.1 2.3 3.0 1.1 N/A 8.0.x (superseded) 7 and later
3.0 2.2 2.2 1.1 N/A 7.0.x 6 and later (7 and later for WebSocket)

The Servlet 3.0 deployment descriptor must be named "WEB-INF/web.xml" in the web application's war file. All Servlet deployment descriptors must indicate the web application schema by using the Java EE
         namespace: http://java.sun.com/xml/ns/javaee
The instance documents may indicate the published version of the schema using the xsi:schemaLocation attribute for Java EE
        namespace with the following location: http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd

<?xml version="1.0" encoding="UTF-8"?>
<web-app 
	xmlns="http://java.sun.com/xml/ns/javaee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                            http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
	version="3.0">

  <servlet>
    <servlet-name>Jersey Web Services</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
    <!-- JBOSS « The URI scheme vfs of the URI vfs:/C:/jboss/bin/content/
    Try using a different deployment mechanism such as explicitly declaring root resource 
    and provider classes using an extension of javax.ws.rs.core.Application
    <param-name>javax.ws.rs.core.Application</param-name>
     -->
      <param-name>com.sun.jersey.config.property.packages</param-name>
      <param-value>com.github.jersey.files</param-value>
    </init-param>
    <init-param>
      <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Jersey Web Services</servlet-name>
    <url-pattern>/jersey/*</url-pattern>
  </servlet-mapping>
  
</web-app>

This version of the Duke's Bookstore application is organized along the Model-View-Controller (MVC) architecture. The MVC architecture is a widely used architectural approach for interactive applications that distributes functionality among application objects so as to minimize the degree of coupling between the objects. To achieve this, it divides applications into three layers: model, view, and controller. Each layer handles specific tasks and has responsibilities to the other layers:

  • The model represents business data, along with business logic or operations that govern access and modification of this business data. The model notifies views when it changes and lets the view query the model about its state. It also lets the controller access application functionality encapsulated by the model. In the Duke's Bookstore application, the shopping cart and database access object contain the business logic for the application.
  • The view renders the contents of a model. It gets data from the model and specifies how that data should be presented. It updates data presentation when the model changes. A view also forwards user input to a controller. The Duke's Bookstore JSP pages format the data stored in the session-scoped shopping cart and the page-scoped database bean.
  • The controller defines application behavior. It dispatches user requests and selects views for presentation. It interprets user inputs and maps them into actions to be performed by the model. In a web application, user inputs are HTTP GET and POST requests. A controller selects the next view to display based on the user interactions and the outcome of the model operations. In the Duke's Bookstore application, the Dispatcher servlet is the controller. It examines the request URL, creates and initializes a session-scoped JavaBeans component--the shopping cart--and dispatches requests to view JSP pages.

Java Servlet Technology « http://docs.oracle.com/javaee/5/tutorial/doc/bnafd.

Servlet « http://docs.oracle.com/javaee/5/tutorial/doc/bnafe.html

Servlet Life Cycle « http://docs.oracle.com/javaee/5/tutorial/doc/bnafi.html

Java EE 5 Tutorial

JSP Page « http://docs.oracle.com/javaee/5/tutorial/doc/bnagy.html

Life Cycle of a JSP « http://docs.oracle.com/javaee/5/tutorial/doc/bnahe.html#indexterm-322

JavaServer Pages 2.0 specification « http://jcp.org/en/jsr/detail?id=152

Creating a JSP Document « http://docs.oracle.com/javaee/5/tutorial/doc/bnajq.html

JSP Scriptlets   « http://docs.oracle.com/javaee/5/tutorial/doc/bnaou.html
	
JSP Expressions  « http://docs.oracle.com/javaee/5/tutorial/doc/bnaov.html

JSP Declarations « http://docs.oracle.com/javaee/5/tutorial/doc/bnaos.html

Implicit Objects « http://docs.oracle.com/javaee/5/tutorial/doc/bnahq.html#bnaij

Implicit objects are created by the web container and contain information related to a particular request, page, session, or application.

JSP Directives are used to control how the web container translates and executes the JSP page.

Page « http://docs.oracle.com/javaee/5/tutorial/doc/bnahe.html#bnahg

include « http://docs.oracle.com/javaee/1.4/tutorial/doc/JSPIntro10.html#wp82812

	Reusing Content in JSP Pages
	
	The include directive « http://docs.oracle.com/javaee/5/tutorial/doc/bnajb.html
	
	The jsp:include element « http://docs.oracle.com/javaee/5/tutorial/doc/bnajc.html
	
Request Dispatcher - include

Tag Libraries « http://docs.oracle.com/javaee/1.4/tutorial/doc/JSPIntro9.html#wp73321

« http://docs.oracle.com/javaee/1.4/tutorial/doc/JSPTags5.html#wp89664

The JavaServer Pages Standard Tag Library (JSTL) encapsulates core functionality common to many JSP applications. Instead of mixing tags from numerous vendors in your JSP applications, you employ a single, standard set of tags. This standardization allows you to deploy your applications on any JSP container that supports JSTL and makes it more likely that the implementation of the tags is optimized.

JSTL has iterator and conditional tags for handling flow control, tags for manipulating XML documents, internationalization tags, tags for accessing databases using SQL, and commonly used functions.

=====

JSP Expression Language « http://docs.oracle.com/javaee/1.4/tutorial/doc/JSPIntro7.html

J2EE 1.4 APIs « http://docs.oracle.com/javaee/1.4/tutorial/doc/Overview7.html

Java servlet technology « lets you define HTTP-specific servlet classes. A servlet class extends the capabilities of servers that host applications that are accessed by way of a request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by web servers.

JavaServer Pages Technology « lets you put snippets of servlet code directly into a text-based document. A JSP page is a text-based document that contains two types of text: static data (which can be expressed in any text-based format such as HTML, WML, and XML) and JSP elements, which determine how the page constructs dynamic content.

⚠️ **GitHub.com Fallback** ⚠️