source: trunk/www/exception/invalid_data.jsp @ 5426

Last change on this file since 5426 was 5426, checked in by Nicklas Nordborg, 11 years ago

References #1514: Fix character encoding of jsp files

  • Add pageEncoding="UTF-8" to all JSP files.
  • Add @charset="UTF-8"; to all CSS files.
  • Add charset="UTF-8" to all <script> tags

This should at least make Eclipse happy and hopefully allow other editors to automatically select the correct encoding.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1<%-- $Id: invalid_data.jsp 5426 2010-09-24 09:18:50Z 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 PermissionDeniedExceptions which are
25  directed here via the exception.jsp page. PermissionDeniedExceptions
26  happen when a user tries to access a protected page without the proper
27  permission. Typically the exception is thrown from the method that
28  retrieves the BaseControl object:
29
30  BASE.getExistingBaseControl(pageContext, permission, item_type);
31
32  The exception is also thrown if trying to manipulate an item without
33  the proper permission, but normally such conditions should not happen
34  if the interface behaves corretly (ie. no "Edit item" link is displayed
35  unless the user has the permission).
36
37  @author Nicklas
38  @version 2.0
39--%>
40<%@ page pageEncoding="UTF-8" session="false"
41  isErrorPage="true"
42%>
43<%@ taglib prefix="base" uri="/WEB-INF/base.tld"
44%>
45<%
46Throwable t = exception;
47//t is either a JasperException, a ServletException or a WebException; see exception.jsp
48if (t instanceof org.apache.jasper.JasperException)
49{
50  t = ((org.apache.jasper.JasperException)t).getRootCause();
51}
52if (t instanceof ServletException)
53{
54  t = ((ServletException)t).getRootCause();
55  // t should now be an InvalidDataException
56}
57Throwable ex = t;
58%>
59<base:page type="default" menu="exception" title="Invalid data">
60<base:head scripts="exception.js" />
61<base:body onload="Exception.fixWindow(false)">
62
63  <div align="center">
64    <base:note type="error" title="<%="On page "+request.getAttribute("javax.servlet.error.request_uri")%>" style="width:90%;">
65    <%=ex.getMessage()%>
66    </base:note>
67  </div>
68
69  <table align="center">
70  <tr>
71    <td id="goback" width="50%"><base:button onclick="history.go(-1);" title="Back" /></td>
72    <td id="close" width="50%"><base:button onclick="window.top.close();" title="Close" /></td>
73  </tr>
74  </table>
75
76</base:body>
77</base:page>
78
Note: See TracBrowser for help on using the repository browser.