Initial Commit
This commit is contained in:
commit
4b78ccbbd9
8 changed files with 179 additions and 0 deletions
21
src/views/StartView.java
Normal file
21
src/views/StartView.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package hsmw.jotto5.beleg.views;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import com.sun.net.httpserver.*;
|
||||
|
||||
public class StartView implements HttpHandler {
|
||||
|
||||
public void handle(HttpExchange t) throws IOException {
|
||||
String response;
|
||||
OutputStream os;
|
||||
|
||||
response = "<h1>Beleg - Startseite!</h1><p>Bitte waehle aus einer der nachstehenden Optionen.</p>";
|
||||
od = t.getResponseBody();
|
||||
|
||||
t.sendResponseHeaders(200, response.length());
|
||||
os.write(response.getBytes());
|
||||
os.close();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue