532 |
09 May 05 |
nicklas |
1 |
<%-- $Id$ |
532 |
09 May 05 |
nicklas |
2 |
------------------------------------------------------------------ |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2005 Nicklas Nordborg |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Nicklas Nordborg |
532 |
09 May 05 |
nicklas |
6 |
|
2304 |
22 May 06 |
jari |
7 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
8 |
Available at http://base.thep.lu.se/ |
532 |
09 May 05 |
nicklas |
9 |
|
532 |
09 May 05 |
nicklas |
10 |
BASE is free software; you can redistribute it and/or |
532 |
09 May 05 |
nicklas |
11 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
12 |
as published by the Free Software Foundation; either version 3 |
532 |
09 May 05 |
nicklas |
13 |
of the License, or (at your option) any later version. |
532 |
09 May 05 |
nicklas |
14 |
|
532 |
09 May 05 |
nicklas |
15 |
BASE is distributed in the hope that it will be useful, |
532 |
09 May 05 |
nicklas |
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
532 |
09 May 05 |
nicklas |
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
532 |
09 May 05 |
nicklas |
18 |
GNU General Public License for more details. |
532 |
09 May 05 |
nicklas |
19 |
|
532 |
09 May 05 |
nicklas |
20 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
21 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
532 |
09 May 05 |
nicklas |
22 |
------------------------------------------------------------------ |
532 |
09 May 05 |
nicklas |
23 |
|
532 |
09 May 05 |
nicklas |
24 |
This page is used to catch PermissionDeniedExceptions which are |
532 |
09 May 05 |
nicklas |
25 |
directed here via the exception.jsp page. PermissionDeniedExceptions |
532 |
09 May 05 |
nicklas |
26 |
happen when a user tries to access a protected page without the proper |
532 |
09 May 05 |
nicklas |
27 |
permission. Typically the exception is thrown from the method that |
532 |
09 May 05 |
nicklas |
28 |
retrieves the BaseControl object: |
532 |
09 May 05 |
nicklas |
29 |
|
532 |
09 May 05 |
nicklas |
30 |
BASE.getExistingBaseControl(pageContext, permission, item_type); |
532 |
09 May 05 |
nicklas |
31 |
|
532 |
09 May 05 |
nicklas |
32 |
The exception is also thrown if trying to manipulate an item without |
532 |
09 May 05 |
nicklas |
33 |
the proper permission, but normally such conditions should not happen |
532 |
09 May 05 |
nicklas |
34 |
if the interface behaves corretly (ie. no "Edit item" link is displayed |
532 |
09 May 05 |
nicklas |
35 |
unless the user has the permission). |
532 |
09 May 05 |
nicklas |
36 |
|
532 |
09 May 05 |
nicklas |
37 |
@author Nicklas |
532 |
09 May 05 |
nicklas |
38 |
@version 2.0 |
532 |
09 May 05 |
nicklas |
39 |
--%> |
5426 |
24 Sep 10 |
nicklas |
40 |
<%@ page pageEncoding="UTF-8" session="false" |
532 |
09 May 05 |
nicklas |
41 |
isErrorPage="true" |
532 |
09 May 05 |
nicklas |
42 |
%> |
532 |
09 May 05 |
nicklas |
43 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" |
532 |
09 May 05 |
nicklas |
44 |
%> |
532 |
09 May 05 |
nicklas |
45 |
<% |
2432 |
27 Jun 06 |
nicklas |
46 |
Throwable t = exception; |
2432 |
27 Jun 06 |
nicklas |
47 |
//t is either a JasperException, a ServletException or a WebException; see exception.jsp |
2432 |
27 Jun 06 |
nicklas |
48 |
if (t instanceof org.apache.jasper.JasperException) |
2432 |
27 Jun 06 |
nicklas |
49 |
{ |
2432 |
27 Jun 06 |
nicklas |
50 |
t = ((org.apache.jasper.JasperException)t).getRootCause(); |
2432 |
27 Jun 06 |
nicklas |
51 |
} |
2432 |
27 Jun 06 |
nicklas |
52 |
if (t instanceof ServletException) |
2432 |
27 Jun 06 |
nicklas |
53 |
{ |
2432 |
27 Jun 06 |
nicklas |
54 |
t = ((ServletException)t).getRootCause(); |
2432 |
27 Jun 06 |
nicklas |
55 |
// t should now be an InvalidDataException |
2432 |
27 Jun 06 |
nicklas |
56 |
} |
2432 |
27 Jun 06 |
nicklas |
57 |
Throwable ex = t; |
5956 |
13 Feb 12 |
nicklas |
58 |
String exceptionClassName = ex.getClass().getName().replaceAll("net.sf.basedb.core.", ""); |
532 |
09 May 05 |
nicklas |
59 |
%> |
532 |
09 May 05 |
nicklas |
60 |
<base:page type="default" menu="exception" title="Invalid data"> |
5956 |
13 Feb 12 |
nicklas |
61 |
<base:head scripts="exception.js" styles="popup.css"/> |
6309 |
21 Aug 13 |
nicklas |
62 |
<base:body> |
5956 |
13 Feb 12 |
nicklas |
63 |
<h1><%=exceptionClassName + " on page "+request.getAttribute("javax.servlet.error.request_uri")%></h1> |
532 |
09 May 05 |
nicklas |
64 |
|
6610 |
20 Nov 14 |
nicklas |
65 |
<div class="content bg-filled-50 bottomborder"> |
6610 |
20 Nov 14 |
nicklas |
66 |
<table style="margin: auto; height: 100%;"> |
6610 |
20 Nov 14 |
nicklas |
67 |
<tr><td> |
6610 |
20 Nov 14 |
nicklas |
68 |
<div class="messagecontainer error"> |
5956 |
13 Feb 12 |
nicklas |
69 |
<%=ex.getMessage()%> |
6610 |
20 Nov 14 |
nicklas |
70 |
</div> |
6610 |
20 Nov 14 |
nicklas |
71 |
</td></tr> |
6610 |
20 Nov 14 |
nicklas |
72 |
</table> |
5956 |
13 Feb 12 |
nicklas |
73 |
</div> |
532 |
09 May 05 |
nicklas |
74 |
|
5956 |
13 Feb 12 |
nicklas |
75 |
<base:buttongroup subclass="dialogbuttons"> |
6309 |
21 Aug 13 |
nicklas |
76 |
<base:button id="goback" title="Back" /> |
6309 |
21 Aug 13 |
nicklas |
77 |
<base:button id="close" title="Close" /> |
5956 |
13 Feb 12 |
nicklas |
78 |
</base:buttongroup> |
532 |
09 May 05 |
nicklas |
79 |
|
532 |
09 May 05 |
nicklas |
80 |
</base:body> |
532 |
09 May 05 |
nicklas |
81 |
</base:page> |
532 |
09 May 05 |
nicklas |
82 |
|