<%@ page isErrorPage="true" %>
<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.SignServlet" %>
<%@ page import="at.knowcenter.wag.egov.egiz.exceptions.*" %>
<%@ page import="java.io.*" %>

<%@ include file="language.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

	<head>
		<title><fmt:message key="errorverify.title"/></title>
		<base href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/"/>
	</head>

<%
  PresentableException pe = (PresentableException)request.getAttribute("PresentableException");
  if (exception != null && exception instanceof PresentableException)
  {
    pe = (PresentableException)exception;
    SignServlet.prepareDispatchToErrorPage(pe, request);
  }

  String error = (request.getAttribute("error") == null ? "" : request.getAttribute("error").toString());
  String cause = (request.getAttribute("cause") == null ? "" : request.getAttribute("cause").toString());
%>

	<body>
		<h1><fmt:message key="common.title"/></h1>
		<h2><fmt:message key="errorverify.heading2"/></h2>
		<div class="pdfasnote"><%= error %></div>
		<div class="pdfasnote"><fmt:message key="errorverify.cause"/>: <strong><%= cause %></strong></div>
		<div class="pdfasverticalspace"></div>
		<a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/jsp/verifyupload.jsp"><fmt:message key="common.back"/></a>
		<pre style="display:none">
		<%
		  if (pe != null) {
		    StringWriter sw = new StringWriter();
		    PrintWriter pw = new PrintWriter(sw);
		    pe.printStackTrace(pw);
		    sw.close();
		    pw.close();
		    out.print(sw);
		  }
		%>
		</pre>
	</body>

</html>