-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.jsp
More file actions
30 lines (30 loc) · 977 Bytes
/
error.jsp
File metadata and controls
30 lines (30 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Error</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
text-align: center;
padding: 50px;
}
h1 {
color: red;
}
</style>
</head>
<body>
<h1>An Error Occurred</h1>
<p><%= session.getAttribute("errorMessage") != null ? session.getAttribute("errorMessage") : "Something went wrong!" %></p>
<% if ("voter".equals(session.getAttribute("role"))) { %>
<a href="voterDashboard.jsp" class="btn">Go to Dashboard</a>
<% } %>
<% if ("candidate".equals(session.getAttribute("role"))) { %>
<a href="candidateDashboard.jsp" class="btn">Go to Dashboard</a>
<% } %>
<% if ("admin".equals(session.getAttribute("role"))) { %>
<a href="adminDashboard.jsp" class="btn">Go to Dashboard</a>
<% } %>
</body>
</html>