ulrich
2017-01-08 57c58de18c43010e66c9e7306340a9cd088952b9
Integration in WebBox
1 files copied
3 files modified
2 files added
7 files renamed
54 ■■■■■ changed files
src/java/de/uhilger/um/web/Initialiser.java 7 ●●●●● patch | view | raw | blame | history
web/WEB-INF/create_database.sql 3 ●●●●● patch | view | raw | blame | history
web/WEB-INF/web.xml 2 ●●●●● patch | view | raw | blame | history
web/fehler.html 10 ●●●●● patch | view | raw | blame | history
web/fehler.jsp 26 ●●●●● patch | view | raw | blame | history
web/ui/index.html 2 ●●● patch | view | raw | blame | history
web/wegkopiert/ui/stile-bootstrap.css patch | view | raw | blame | history
web/wegkopiert/ui/stile-neutral.css patch | view | raw | blame | history
web/wegkopiert/ui/stile-skeleton.css patch | view | raw | blame | history
web/wegkopiert/ui/user-bootstrap.html patch | view | raw | blame | history
web/wegkopiert/ui/user-neutral.html patch | view | raw | blame | history
web/wegkopiert/ui/user-skeleton.html patch | view | raw | blame | history
web/wegkopiert/ui/user.html 4 ●●●● patch | view | raw | blame | history
src/java/de/uhilger/um/web/Initialiser.java
@@ -21,6 +21,7 @@
import de.uhilger.baselink.PersistenceManager;
import de.uhilger.baselink.Record;
import de.uhilger.um.api.UserMgr;
import de.uhilger.um.daten.User;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -127,6 +128,12 @@
      if(!dbVorhanden(db, sql.getProperty(SQL_DB_VORHANDEN))) {
        logger.info("Datenbank ist nicht vorhanden");
        int[] ergebnis = db.executeScript(getSqlSkript());
        User admin = new User();
        admin.setId("admin");
        admin.setPw("admin");
        UserMgr um = new UserMgr();
        um.setServletContext(servletContext);
        um.createUser(admin);
      }
    } catch(Exception ex) {
      logger.log(Level.INFO, ex.getMessage(), ex);
web/WEB-INF/create_database.sql
@@ -17,6 +17,9 @@
   ROLE_NAME  VARCHAR(250)   NOT NULL,
   PRIMARY KEY (USER_NAME, ROLE_NAME)
);
insert into APP.USER_ROLES (user_name, role_name) values ('admin', 'manager-gui');
insert into APP.USER_ROLES (user_name, role_name) values ('admin', 'nutzerAdmin');
insert into APP.USER_ROLES (user_name, role_name) values ('admin', 'sqlKonsole');
create table APP.keytable (
  key_name            varchar(80) not null primary key,
web/WEB-INF/web.xml
@@ -43,6 +43,8 @@
            <web-resource-name>nutzerAdmin</web-resource-name>
            <description>Nutzer-Administration</description>
            <url-pattern>/ui/*</url-pattern>
            <url-pattern>/svc/*</url-pattern>
            <url-pattern>/api/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <description>nutzerAdminAuthContraint</description>
web/fehler.html
New file
@@ -0,0 +1,10 @@
<html>
  <head>
        <meta name="viewport" content="width=device-width">
    <title>Fehler</title>
  </head>
  <body>
    <p>Hoppla!</p>
    <p>Die Seite wurde nicht gefunden.</p>
  </body>
</html>
web/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>
web/ui/index.html
File was renamed from web/ui/user.html
@@ -11,7 +11,7 @@
    <div id="inhalt">
      <div class="breadcrumb">
        <a class="breadcrumb-item" href="/">WebBox</a>
        <a class="breadcrumb-item" href="/mng/index.html">Verwaltung</a>
        <a class="breadcrumb-item" href="/wbx/">Verwaltung</a>
        <span class="breadcrumb-item active">Benutzer</span>
      </div>
      <!-- <h1>Benutzer</h1> -->
web/wegkopiert/ui/stile-bootstrap.css
web/wegkopiert/ui/stile-neutral.css
web/wegkopiert/ui/stile-skeleton.css
web/wegkopiert/ui/user-bootstrap.html
web/wegkopiert/ui/user-neutral.html
web/wegkopiert/ui/user-skeleton.html
web/wegkopiert/ui/user.html
copy from web/ui/user.html copy to web/wegkopiert/ui/user.html
File was copied from web/ui/user.html
@@ -10,8 +10,8 @@
  <body>
    <div id="inhalt">
      <div class="breadcrumb">
        <a class="breadcrumb-item" href="/">WebBox</a>
        <a class="breadcrumb-item" href="/mng/index.html">Verwaltung</a>
        <a class="breadcrumb-item" href="/wbx/">WebBox</a>
        <a class="breadcrumb-item" href="/wbx/mng/index.html">Verwaltung</a>
        <span class="breadcrumb-item active">Benutzer</span>
      </div>
      <!-- <h1>Benutzer</h1> -->