Minimalistisches CATALINA_BASE
.
ulrich
2019-12-07 c81724d9a871f360c102a90de1bad9cd556ec0ca
.
4 files modified
60 ■■■■ changed files
readme.md 23 ●●●●● patch | view | raw | blame | history
webapps/ROOT/WEB-INF/web.xml 16 ●●●●● patch | view | raw | blame | history
webapps/ROOT/fehler.jsp 4 ●●●● patch | view | raw | blame | history
webapps/ROOT/stile.css 17 ●●●● patch | view | raw | blame | history
readme.md
@@ -30,3 +30,26 @@
## ROOT Context
Der Inhalt für `http://localhost:8080/` liegt in `CATALINA_BASE/webapps/ROOT`.
### Fehler-Seiten
Der Deployment Descriptor des ROOT Context, die Datei `CATALINA_BASE/webapps/ROOT/WEB-INF/web.xml`, enthält u.a. eine Deklaration von Standardfehlerseiten. Das sorgt im Fall eines Fehlers für die Anzeige einer neutralen Seite.
```
<error-page>
  <exception-type>java.lang.Throwable</exception-type>
  <location>/fehler.html</location>
</error-page>
<error-page>
  <error-code>403</error-code>
  <location>/nicht-erlaubt.html</location>
</error-page>
<error-page>
  <error-code>404</error-code>
  <location>/fehler.html</location>
</error-page>
<error-page>
  <error-code>500</error-code>
  <location>/fehler.html</location>
</error-page>
```
webapps/ROOT/WEB-INF/web.xml
@@ -7,11 +7,27 @@
      30
    </session-timeout>
  </session-config>
  <!-- Willkommensseiten -->
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
  <!-- Fehlerseiten -->
  <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/fehler.jsp</location>
  </error-page>
  <error-page>
    <error-code>403</error-code>
    <location>/nicht-erlaubt.html</location>
  </error-page>
  <error-page>
    <error-code>404</error-code>
    <location>/fehler.jsp</location>
  </error-page>
  <error-page>
    <error-code>500</error-code>
    <location>/fehler.jsp</location>
  </error-page>
</web-app>
webapps/ROOT/fehler.jsp
@@ -5,11 +5,11 @@
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    body {
      font-family:Arial,Helvetica,sans-serif;
      font-size:10pt;
      font-size:12pt;
    }
  </style>
  <title>Fehler</title>
webapps/ROOT/stile.css
@@ -1,18 +1,5 @@
body {
    font-size: 12pt;
}
h1 {
  font-size: 2.2em;
}
h3 {
  font-size: 1.2em;
}
.inhalt {
  display: flex;
  flex-direction: row;
  padding-left: 3em;
  font-family:Arial,Helvetica,sans-serif;
  font-size: 12pt;
}