Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:tomcat10:tc01 [2023/10/07 13:46] – admin | elearning:workbooks:tomcat10:tc01 [2023/10/09 09:18] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 29: | Ligne 29: | ||
* Les Sessions HTTP | * Les Sessions HTTP | ||
- | =====Présentation de Tomcat | + | =====Présentation de Tomcat===== |
====Historique et différentes versions==== | ====Historique et différentes versions==== | ||
Ligne 60: | Ligne 60: | ||
| 8.x | 3.1 | 2.3 | Java EE 7 et + | | | 8.x | 3.1 | 2.3 | Java EE 7 et + | | ||
| 9.x | 4.0 | 2.3 | Java EE 8 et + | | | 9.x | 4.0 | 2.3 | Java EE 8 et + | | ||
- | | 10.0.11 | + | | 10 | 5.0 | 3.0 | Java EE 8 et + | |
+ | | 10.1 | 6.0 | 3.1 | Jakarta EE | | ||
+ | |||
+ | Tomcat 9 implémentait un sous-jeux de la spécification Java EE 8, à savoir : | ||
+ | |||
+ | * Servlets | ||
+ | * Java Server Pages | ||
+ | * Java Unified Expression Language | ||
+ | * Java Websocket | ||
+ | * Java Debugging Support | ||
+ | * Java Authentication Service Provider | ||
+ | * Common Annotations | ||
=====Rappel sur les applications Web en Java===== | =====Rappel sur les applications Web en Java===== | ||
Ligne 72: | Ligne 83: | ||
* des applets (applications embarquées dans des pages HTML). | * des applets (applications embarquées dans des pages HTML). | ||
- | Lors du développement d'une application, | + | Lors du développement d'une application, |
- | Java se décompose | + | Java se décomposait |
* JSE (//Java Standard Edition//), | * JSE (//Java Standard Edition//), | ||
Ligne 89: | Ligne 100: | ||
* une plate-forme de développement d' | * une plate-forme de développement d' | ||
- | En **1998**, la version 1.2 de ces plate-formes, | + | En **1998**, la version 1.2 de ces plate-formes, |
- | En **2004**, la version | + | ^ Version |
+ | | J2EE 1.2 | 12/ | ||
+ | | J2EE 1.3 | 09/ | ||
+ | | J2EE 1.4 | 11/ | ||
+ | | | ||
+ | | Java EE 6 | 12/ | ||
+ | | Java EE 7 | 04/ | ||
+ | | Java EE 8 | 08/ | ||
- | En **2006**, la version 1.6 ou **Java 6** a été publiée et le chiffre 2 retiré de J2SE et J2EE. | + | Le JRE de la plate-forme JSE était |
- | + | ||
- | La version **actuelle** de la plate-forme est la version **8**. | + | |
- | + | ||
- | Le JRE de la plate-forme JSE est constitué des éléments suivants : | + | |
* **JVM** (//Java Virtual Machine//), | * **JVM** (//Java Virtual Machine//), | ||
Ligne 105: | Ligne 119: | ||
* Des composants logiciels prêt à l' | * Des composants logiciels prêt à l' | ||
- | Outre les deux éléments précédents, | + | Outre les deux éléments précédents, |
* **javac**, | * **javac**, | ||
Ligne 113: | Ligne 127: | ||
* **javadoc**, | * **javadoc**, | ||
* un générateur de documentation. | * un générateur de documentation. | ||
+ | |||
+ | =====Jakarta EE===== | ||
+ | |||
+ | En septembre 2017, Oracle a décidé de céder la partie EE de Java à la Fondation Eclipse. Par contre Oracle n'a pas été d' | ||
+ | |||
+ | En février 2018, la Fondation, plongeant dans le passé des projets de la Fondation Apache, a décidé de renommer Java EE en **[[https:// | ||
+ | |||
+ | Jakarta EE spécifie, entre autre, les : | ||
+ | |||
+ | * Jakarta Server Pages ( JSP ) | ||
+ | * Jakarta Standard Tag Library ( JSTL ) | ||
+ | * Jakarta Enterpsire Beans (EJB ) | ||
+ | * Jakarta RESTful Web Services ( JAX-RS ) | ||
+ | * Jakarta Bean Validation | ||
+ | * Jakarta Contexts and Dependany Injection ( CDI ) | ||
+ | * Jakarta Persistance ( JPA ) | ||
+ | |||
+ | Jakarta est opensource et est indépendant d'un ISV (Independant Software Vendor). | ||
+ | |||
+ | Jakarta EE a été accepté par le marché parce que c'' | ||
+ | |||
+ | La première version de Jakarta EE était la 8, sortie en octobre 2019 et entièrement compatible avec Java EE 8, suivie par : | ||
+ | |||
+ | ^ Version Jakarta | ||
+ | | Jakarta EE 9 | 08/ | ||
+ | | Jakarta EE 9.1 | 25/ | ||
+ | | Jakarta EE 10 | 13/ | ||
=====Contenu statique, dynamique, Servlets, JSPs et Composants EJB===== | =====Contenu statique, dynamique, Servlets, JSPs et Composants EJB===== | ||
Ligne 275: | Ligne 316: | ||
Ces modules possèdent un **descripteur de déploiement** sous la forme d'un fichier appelé **ra.xml** et sont assemblés dans un fichier compressé au format **zip** ayant une extension **.rar**. | Ces modules possèdent un **descripteur de déploiement** sous la forme d'un fichier appelé **ra.xml** et sont assemblés dans un fichier compressé au format **zip** ayant une extension **.rar**. | ||
- | =====Positionnement d' | + | =====Positionnement d' |
Le serveur Tomcat ne dispose pas de l' | Le serveur Tomcat ne dispose pas de l' | ||
Ligne 432: | Ligne 473: | ||
< | < | ||
< | < | ||
+ | </ | ||
+ | |||
+ | <!-- Define a Security Constraint on this Application --> | ||
+ | <!-- NOTE: None of these roles are present in the default users file --> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <!-- Define the Login Configuration for this Application --> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | <!-- Security roles referenced by this web application --> | ||
+ | < | ||
+ | < | ||
+ | The role that is required to access the HTML Manager pages | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | The role that is required to access the text Manager pages | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | The role that is required to access the HTML JMX Proxy | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | The role that is required to access to the Manager Status pages | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | <?xml version=" | ||
+ | <!-- | ||
+ | | ||
+ | contributor license agreements. | ||
+ | this work for additional information regarding copyright ownership. | ||
+ | The ASF licenses this file to You under the Apache License, Version 2.0 | ||
+ | (the " | ||
+ | the License. | ||
+ | |||
+ | http:// | ||
+ | |||
+ | Unless required by applicable law or agreed to in writing, software | ||
+ | distributed under the License is distributed on an "AS IS" BASIS, | ||
+ | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
+ | See the License for the specific language governing permissions and | ||
+ | limitations under the License. | ||
+ | --> | ||
+ | <web-app xmlns=" | ||
+ | xmlns: | ||
+ | xsi: | ||
+ | https:// | ||
+ | version=" | ||
+ | metadata-complete=" | ||
+ | |||
+ | < | ||
+ | < | ||
+ | A scriptable management web application for the Tomcat Web Server; | ||
+ | Manager lets you view, load/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <!-- Uncomment this to show proxy sessions from the Backup manager or a | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | --> | ||
+ | < | ||
+ | <!-- 50MB max --> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | <!-- Define the Manager Servlet Mapping --> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <!-- Configured to set X-FRAME-OPTIONS. Disable HSTS in case it interferes --> | ||
+ | <!-- with an existing setting. Keep X-Content-Type-Options and | ||
+ | <!-- X-XSS-Protection as they are page specific. | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
</ | </ | ||
Ligne 527: | Ligne 783: | ||
< | < | ||
- | <?xml version=" | + | <?xml version=" |
</ | </ | ||
Ligne 533: | Ligne 789: | ||
< | < | ||
- | <web-app xmlns=" | + | <web-app xmlns=" |
xmlns: | xmlns: | ||
- | xsi: | + | xsi: |
- | | + | |
- | version=" | + | version=" |
metadata-complete=" | metadata-complete=" | ||
... | ... | ||
Ligne 558: | Ligne 814: | ||
</ | </ | ||
- | L' | + | L' |
< | < | ||
- | <filter> | + | <request-character-encoding> |
- | <filter-name> | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </init-param> | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | Ensuite l' | + | |
- | + | ||
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
</ | </ | ||
Ligne 583: | Ligne 823: | ||
< | < | ||
- | | + | |
< | < | ||
< | < | ||
Ligne 598: | Ligne 838: | ||
< | < | ||
</ | </ | ||
+ | <!-- Uncomment this to show proxy sessions from the Backup manager or a | ||
+ | | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | --> | ||
< | < | ||
+ | <!-- 50MB max --> | ||
< | < | ||
< | < | ||
Ligne 643: | Ligne 891: | ||
< | < | ||
- | < | + | <!-- Define a Security Constraint on this Application --> |
+ | <!-- NOTE: None of these roles are present in the default users file --> | ||
+ | < | ||
< | < | ||
< | < | ||
Ligne 682: | Ligne 932: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | <!-- Define the Login Configuration for this Application --> | ||
< | < | ||
< | < | ||
< | < | ||
</ | </ | ||
+ | |||
+ | <!-- Security roles referenced by this web application --> | ||
< | < | ||
< | < |