Skip to content

Commit 9d86f68

Browse files
fixed #281, fixed #283
1 parent 2eafc3a commit 9d86f68

File tree

3 files changed

+92
-82
lines changed

3 files changed

+92
-82
lines changed

src/main/java/org/woehlke/twitterwall/frontend/controller/LoginController.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ public String login(Model model) {
2323
return "login/login";
2424
}
2525

26+
@RequestMapping("/logout_success")
27+
public String logout(Model model) {
28+
log.debug("-----------------------------------------");
29+
String symbol = Symbols.LOGIN.toString();
30+
String title = "Logged Out";
31+
String subtitle = "Enter your Credentials, to log in again";
32+
model = contentFactory.setupPage(model, title, subtitle, symbol);
33+
log.debug("-----------------------------------------");
34+
return "login/login";
35+
}
36+
2637
private static final Logger log = LoggerFactory.getLogger(LoginController.class);
2738

2839
private final ContentFactory contentFactory;

src/main/resources/templates/exceptionhandler/error.html

Lines changed: 58 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,74 @@
11
<!DOCTYPE html>
22
<html xmlns="http://www.w3.org/1999/xhtml"
3-
xmlns:th="http://www.thymeleaf.org">
3+
xmlns:th="http://www.thymeleaf.org"
4+
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
45
<head th:include="layoutMain :: tw-head">
56
</head>
67
<body id="page-top" class="page-2" style="padding-top:50px; padding-bottom:200px;">
78
<header th:include="layoutMain :: tw-header" >
89
</header>
910
<main class="page-content">
10-
<div class="container">
11-
<div class="row">
12-
<div class="col-md-12">
13-
<h2>Application Error, please contact <a href="/imprint" th:href="@{/imprint}"> Support</a>.</h2>
14-
<h3>Debug Information:</h3>
15-
<div class="well">
16-
<div class="row">
17-
<div class="col-md-6">Requested URL=</div>
18-
<div class="col-md-6">
19-
<span th:text="${url}">url</span>
11+
<div class="tw-page-content tw-page-content-exceptions">
12+
<div class="container">
13+
<div class="row">
14+
<div class="col-md-12">
15+
<h2>Fehler. Bitte kontaktieren Sie den <a href="/imprint" th:href="@{/imprint}"> Support</a>.</h2>
16+
17+
<p th:if="${url}">
18+
<b>Seite:</b> <span th:text="${url}">Page URL</span>
19+
</p>
20+
21+
<p th:if="${timestamp}" id='created'>
22+
<b>Zeitpunkt:</b> <span th:text="${timestamp}">Timestamp</span>
23+
</p>
24+
25+
<p th:if="${status}">
26+
<b>HTTP Status:</b> <span th:text="${status}">status-code</span> <span
27+
th:if="${error}" th:text="'('+${error}+')'">error ...</span>
28+
</p>
29+
30+
<!--/* ${ex} is set by ourSimpleMappingExceptionResolver,
31+
${exception} or ${message} are set internally by Spring Boot. */-->
32+
<div sec:authorize="isAuthenticated()">
33+
<div th:if="${ex} or ${exception} or (${message} and ${message.length() != 0})">
34+
<b>Cause:</b> <span th:if="${ex}" th:text="${ex}">exception ...</span>
35+
<span th:if="${exception}" th:text="${exception}">exception ...</span>
36+
<span th:if="${message} and ${message.length() != 0}" th:text="${message}">message ...</span>
2037
</div>
38+
39+
<p th:unless="${ex} or ${exception} or (${message} and ${message.length() != 0})">
40+
Ursache unbekannt (keine Details vorhanden).s
41+
</p>
42+
2143
</div>
22-
<div class="row">
23-
<div class="col-md-6">Exception=</div>
24-
<div class="col-md-6">
25-
<span th:text="${exception.message}">exception.message</span>
26-
</div>
44+
</div>
45+
</div>
46+
47+
<div class="row" sec:authorize="isAuthenticated()">
48+
<div class="col-md-12">
49+
<strong>Exception Stack Trace</strong><br/>
50+
<div th:if="${exception}">
51+
<ul th:each="e : ${exception.suppressed}">
52+
<span th:text="${e.message}">e.message</span>
53+
<ul th:each="stack : ${e.stackTrace}">
54+
<li th:text="${stack">stack</li>
55+
</ul>
56+
</ul>
57+
<ul th:each="ste : ${exception.stackTrace}">
58+
<li th:text="${ste}">ste</li>
59+
</ul>
2760
</div>
28-
<!--
29-
<div class="row">
30-
<div class="col-md-12">
31-
<strong>Exception Stack Trace</strong><br/>
32-
<ul th:each="ste : ${exception.stackTrace}">
33-
<li th:text="${ste}">ste</li>
61+
<div th:if="${ex}">
62+
<ul th:each="e : ${ex.suppressed}">
63+
<span th:text="${e.message}">e.message</span>
64+
<ul th:each="stack : ${e.stackTrace}">
65+
<li th:text="${stack">stack</li>
3466
</ul>
35-
</div>
67+
</ul>
68+
<ul th:each="ste : ${ex.stackTrace}">
69+
<li th:text="${ste}">ste</li>
70+
</ul>
3671
</div>
37-
-->
3872
</div>
3973
</div>
4074
</div>

src/main/resources/templates/exceptionhandler/persistentObjectNotFound.html

Lines changed: 23 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -8,76 +8,41 @@
88
<header th:include="layoutMain :: tw-header" >
99
</header>
1010

11-
1211
<main class="page-content">
13-
<div class="tw-page-content tw-page-content-exceptions">
14-
<div class="container">
15-
<div class="row">
16-
<div class="col-md-12">
17-
<h2>Fehler. Bitte kontaktieren Sie den <a href="/imprint" th:href="@{/imprint}"> Support</a>.</h2>
18-
19-
<p th:if="${url}">
20-
<b>Seite:</b> <span th:text="${url}">Page URL</span>
21-
</p>
22-
23-
<p th:if="${timestamp}" id='created'>
24-
<b>Zeitpunkt:</b> <span th:text="${timestamp}">Timestamp</span>
25-
</p>
26-
27-
<p th:if="${status}">
28-
<b>HTTP Status:</b> <span th:text="${status}">status-code</span> <span
29-
th:if="${error}" th:text="'('+${error}+')'">error ...</span>
30-
</p>
31-
32-
<!--/* ${ex} is set by ourSimpleMappingExceptionResolver,
33-
${exception} or ${message} are set internally by Spring Boot. */-->
34-
<div sec:authorize="isAuthenticated()">
35-
<div th:if="${ex} or ${exception} or (${message} and ${message.length() != 0})">
36-
<b>Cause:</b> <span th:if="${ex}" th:text="${ex}">exception ...</span>
37-
<span th:if="${exception}" th:text="${exception}">exception ...</span>
38-
<span th:if="${message} and ${message.length() != 0}" th:text="${message}">message ...</span>
12+
<div class="container">
13+
<div class="row">
14+
<div class="col-md-12">
15+
<h2>Application Error, please contact <a href="/imprint" th:href="@{/imprint}"> Support</a>.</h2>
16+
<h3>Debug Information:</h3>
17+
<div class="well">
18+
<div class="row">
19+
<div class="col-md-6">Requested URL=</div>
20+
<div class="col-md-6">
21+
<span th:text="${url}">url</span>
3922
</div>
40-
41-
<p th:unless="${ex} or ${exception} or (${message} and ${message.length() != 0})">
42-
Ursache unbekannt (keine Details vorhanden).s
43-
</p>
44-
4523
</div>
46-
</div>
47-
</div>
48-
49-
<div class="row" sec:authorize="isAuthenticated()">
50-
<div class="col-md-12">
51-
<strong>Exception Stack Trace</strong><br/>
52-
<div th:if="${exception}">
53-
<ul th:each="e : ${exception.suppressed}">
54-
<span th:text="${e.message}">e.message</span>
55-
<ul th:each="stack : ${e.stackTrace}">
56-
<li th:text="${stack">stack</li>
57-
</ul>
58-
</ul>
59-
<ul th:each="ste : ${exception.stackTrace}">
60-
<li th:text="${ste}">ste</li>
61-
</ul>
24+
<div class="row">
25+
<div class="col-md-6">Exception=</div>
26+
<div class="col-md-6">
27+
<span th:text="${exception.message}">exception.message</span>
28+
</div>
6229
</div>
63-
<div th:if="${ex}">
64-
<ul th:each="e : ${ex.suppressed}">
65-
<span th:text="${e.message}">e.message</span>
66-
<ul th:each="stack : ${e.stackTrace}">
67-
<li th:text="${stack">stack</li>
30+
<!--
31+
<div class="row">
32+
<div class="col-md-12">
33+
<strong>Exception Stack Trace</strong><br/>
34+
<ul th:each="ste : ${exception.stackTrace}">
35+
<li th:text="${ste}">ste</li>
6836
</ul>
69-
</ul>
70-
<ul th:each="ste : ${ex.stackTrace}">
71-
<li th:text="${ste}">ste</li>
72-
</ul>
37+
</div>
7338
</div>
39+
-->
7440
</div>
7541
</div>
7642
</div>
7743
</div>
7844
</main>
7945

80-
8146
<section th:include="layoutMain :: tw-history-back-section" >
8247
</section>
8348

0 commit comments

Comments
 (0)