Minimalistisches CATALINA_BASE
.
ulrich
2019-12-07 ea4c0c532c76f43492ad4c0ad6754baf8fc9f44c
.
4 files added
1 files modified
99 ■■■■■ changed files
readme.md 26 ●●●●● patch | view | raw | blame | history
webapps/ROOT/WEB-INF/web.xml 17 ●●●●● patch | view | raw | blame | history
webapps/ROOT/fehler.jsp 26 ●●●●● patch | view | raw | blame | history
webapps/ROOT/index.html 12 ●●●●● patch | view | raw | blame | history
webapps/ROOT/stile.css 18 ●●●●● patch | view | raw | blame | history
readme.md
@@ -5,4 +5,28 @@
Im Start-Skript von Tomcat können deshalb zwei verschiedene Verzeichnisse angegeben werden:
1. Das Verzeichnis mit der Tomcat-Software und
2. Das Verzeichnis für Konfigurationen und auszuführende Anwendungen.
2. das Verzeichnis für Konfigurationen und auszuführende Anwendungen.
```
#!/bin/sh
export JRE_HOME=/home/fred/zulu11.33.15-ca-jdk11.0.4-linux_x64
export CATALINA_HOME=/home/fred/apache-tomcat-9.0.29
export CATALINA_BASE=/home/fred/tomcat-base
$CATALINA_HOME/bin/sh catalina.sh start
```
In diesem Repository ist ein minimalistischer Inhalt von `CATALINA_BASE` mit Einstellungen hinterlegt, die nachfolgend näher beschrieben sind.
## Benutzer
Es sind keine Benutzer konfiguriert. Benutzer können z.B. in der Datei `CATALINA_BASE/conf/tomcat-users.xml` angelegt werden. Die [Dokumentation von Tomcat](http://tomcat.apache.org/tomcat-9.0-doc/realm-howto.html) liefert mehr Informationen zur Konfiguration von Authentifizierung und Autorisierung.
## Tomcat Manager
Die [Manager-App](http://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html), die als Teil des Standard-Pakets von Tomcat ausgeliefert wird, ist über die Datei `$CATALINA_BASE/conf/Catalina/localhost/manager.xml` eingeschaltet.
## ROOT Context
Der Inhalt für `http://localhost:8080/` liegt in `CATALINA_BASE/webapps/ROOT`.
webapps/ROOT/WEB-INF/web.xml
New file
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <description>WebBox</description>
  <display-name>WebBox</display-name>
  <session-config>
    <session-timeout>
      30
    </session-timeout>
  </session-config>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
  <error-page>
    <error-code>404</error-code>
    <location>/fehler.jsp</location>
  </error-page>
</web-app>
webapps/ROOT/fehler.jsp
New file
@@ -0,0 +1,26 @@
<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width">
  <style>
    body {
      font-family:Arial,Helvetica,sans-serif;
      font-size:10pt;
    }
  </style>
  <title>Fehler</title>
  <%
    String url = request.getRequestURL().toString();
    url = url.substring(0, url.lastIndexOf("/"));
  %>
</head>
<body>
<p>Hoppla! Diese Seite wurde nicht gefunden.</p>
<p>Klicken Sie <a href="<%=url%>">hier</a> um zur Hauptseite zu gelangen.</p>
</body>
</html>
webapps/ROOT/index.html
New file
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
    <head>
        <title>WebBox Startseite</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" type="text/css" href="stile.css">
    </head>
    <body>
      <p>WebBox</p>
    </body>
</html>
webapps/ROOT/stile.css
New file
@@ -0,0 +1,18 @@
body {
    font-size: 12pt;
}
h1 {
  font-size: 2.2em;
}
h3 {
  font-size: 1.2em;
}
.inhalt {
  display: flex;
  flex-direction: row;
  padding-left: 3em;
}