1 | <%-- $Id: not_logged_in.jsp 7680 2019-04-04 07:08:48Z nicklas $ |
---|
2 | ------------------------------------------------------------------ |
---|
3 | Copyright (C) 2005 Nicklas Nordborg |
---|
4 | Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg |
---|
5 | Copyright (C) 2007 Nicklas Nordborg |
---|
6 | |
---|
7 | This file is part of BASE - BioArray Software Environment. |
---|
8 | Available at http://base.thep.lu.se/ |
---|
9 | |
---|
10 | BASE is free software; you can redistribute it and/or |
---|
11 | modify it under the terms of the GNU General Public License |
---|
12 | as published by the Free Software Foundation; either version 3 |
---|
13 | of the License, or (at your option) any later version. |
---|
14 | |
---|
15 | BASE is distributed in the hope that it will be useful, |
---|
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
18 | GNU General Public License for more details. |
---|
19 | |
---|
20 | You should have received a copy of the GNU General Public License |
---|
21 | along with BASE. If not, see <http://www.gnu.org/licenses/>. |
---|
22 | ------------------------------------------------------------------ |
---|
23 | |
---|
24 | This page is used to catch NotLoggedInExceptions which are |
---|
25 | directed here via the exception.jsp page. NotLoggedInExceptions |
---|
26 | happen when a user tries to access a protected page without beeing |
---|
27 | logged in. Typically the exception is thrown from the method that |
---|
28 | retrieves the BaseControl object: |
---|
29 | |
---|
30 | BASE.getExistingBaseControl(pageContext); |
---|
31 | |
---|
32 | This page will display a new login form allowing the user |
---|
33 | to login again and continue with what he/she was doing. |
---|
34 | |
---|
35 | @author Nicklas |
---|
36 | @version 2.0 |
---|
37 | --%> |
---|
38 | <%@ page pageEncoding="UTF-8" session="false" |
---|
39 | import="net.sf.basedb.core.Application" |
---|
40 | import="net.sf.basedb.core.SessionControl" |
---|
41 | import="net.sf.basedb.clients.web.Base" |
---|
42 | import="net.sf.basedb.util.Values" |
---|
43 | isErrorPage="true" |
---|
44 | %> |
---|
45 | <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
---|
46 | <% |
---|
47 | final SessionControl sc = Base.getSessionControl(pageContext, true); |
---|
48 | final String ID = sc.getId(); |
---|
49 | final String root = request.getContextPath()+"/"; |
---|
50 | final String redirect = Values.getString((String)request.getAttribute("redirect")); |
---|
51 | |
---|
52 | try |
---|
53 | { |
---|
54 | %> |
---|
55 | <base:page type="default" menu="exception" title="Not logged in"> |
---|
56 | <base:head scripts="exception.js"> |
---|
57 | <style> |
---|
58 | .default h1 |
---|
59 | { |
---|
60 | position: inherit; |
---|
61 | height: auto; |
---|
62 | width: auto; |
---|
63 | } |
---|
64 | .popup h1 |
---|
65 | { |
---|
66 | margin-left: 0.5em; |
---|
67 | } |
---|
68 | </style> |
---|
69 | </base:head> |
---|
70 | <base:body data-resize-if-popup="1"> |
---|
71 | |
---|
72 | <table style="margin: auto; max-width: 600px; margin-top:5em; margin-bottom: 1em;"> |
---|
73 | <tr> |
---|
74 | <td> |
---|
75 | <h1>Not logged in</h1> |
---|
76 | <div class="messagecontainer error" style="margin-top: 0.25em; padding: 1em; font-size: 120%;"> |
---|
77 | You have been automatically logged out due to inactivity or because the |
---|
78 | server has been restarted. |
---|
79 | You may log in again and continue your work but unsaved changes |
---|
80 | may have been lost. |
---|
81 | </div> |
---|
82 | </td> |
---|
83 | </tr> |
---|
84 | </table> |
---|
85 | |
---|
86 | <base:buttongroup subclass="dialogbuttons"> |
---|
87 | <base:button id="close" title="Close"/> |
---|
88 | <base:button id="gologin" image="login.png" title="Login again…" /> |
---|
89 | </base:buttongroup> |
---|
90 | |
---|
91 | </base:body> |
---|
92 | </base:page> |
---|
93 | <% |
---|
94 | } |
---|
95 | finally |
---|
96 | {} |
---|
97 | %> |
---|