ulrich
2018-02-23 40d4a40cbfda7439e50dc2f37b7ab90b5876c1f2
Einstellungen fuer die Datenbank-Konfiguration ergaenzt
3 files modified
31 ■■■■■ changed files
web/META-INF/context.xml 14 ●●●●● patch | view | raw | blame | history
web/WEB-INF/create_database.sql 13 ●●●●● patch | view | raw | blame | history
web/WEB-INF/web.xml 4 ●●●● patch | view | raw | blame | history
web/META-INF/context.xml
@@ -1,2 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/radiozentrale"/>
<Context path="/radiozentrale">
  <Resource name="jdbc/RadioDB"
      auth="Container"
      type="javax.sql.DataSource"
      username="dbadmin"
      password="changeit"
      driverClassName="org.apache.derby.jdbc.ClientDriver"
      url="jdbc:derby://127.0.0.1:1528/radio;create=true"
      maxActive="60"
      maxIdle="30"
      maxWait="5000"
  />
</Context>
web/WEB-INF/create_database.sql
@@ -9,9 +9,22 @@
);
create index sname on app.sender (sender_name);
create table app.abspieler
(
   abs_id        int not null,
   abs_name      varchar(1024) not null,
   abs_url       varchar(1024),
   abs_typ       varchar(1024),
   abs_bild      varchar(1024),
   abs_zustand   varchar(1024),
   primary key (sender_id)
);
create index sname on app.sender (sender_name);
create table app.keytable (
  key_name            varchar(80) not null primary key,
    key_next            int
);
create index key_name_next ON app.keytable (key_name,key_next);
insert into app.keytable (key_name, key_next) values ('sender_id',1);
insert into app.keytable (key_name, key_next) values ('abs_id',1);
web/WEB-INF/web.xml
@@ -2,6 +2,10 @@
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
    <description>Webradio</description>
    <display-name>Radiozentrale</display-name>
    <context-param>
        <param-name>dsname</param-name>
        <param-value>jdbc/RadioDB</param-value>
    </context-param>
    <session-config>
        <session-timeout>
            30