<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>

<%-- The default error screen that will be displayed if no specific screen is set --%>

<%@ page import = "org.apache.turbine.util.*" %> 
<%@ page import = "java.util.*" %> 


<% RunData rundata = (RunData)request.getAttribute("rundata"); %>

<table border=1 cellpadding="5"> 

<%-- Error Message --%>
  <tr> 
    <td>
      <br>
      <h2><jetspeed:l10n key="ERROR_THERE_HAS_BEEN_AN_ER_JSP"/></h2><jetspeed:l10n key="ERROR_REASON_JSP"/><pre>
        <%= rundata.getStackTrace() %>
      </pre>
    </td>
  </tr> 


<%-- HTTP Parameters --%>
<% 
  Enumeration keys;
  String key;
  String value;

  keys = rundata.getParameters().keys();
  if (keys.hasMoreElements()) {
%>
    <tr> 
      <td>
        <br>
        <h3><jetspeed:l10n key="ERROR_GET_POST_DATA_JSP"/></h3>
          <table border=0> 
<%
          keys = rundata.getParameters().keys();
          while ( keys.hasMoreElements() )
          {
            key   = (String) keys.nextElement();
%>
            <tr>
              <td><b> <%= key %> </b></td>
              <td> =  <%= rundata.getParameters().getString(key) %></td>
            <tr>
<%
          }
%>
        </table>
      </td> 
    </tr> 
  <% 
  } 
  %>

<%-- Debug Keys --%>
<%
  keys = rundata.getVarDebug().keys();
  if (keys.hasMoreElements()) {
%>
    <tr> 
      <td>
        <br>
        <h3><jetspeed:l10n key="ERROR_DEBUGGING_DATA_JSP"/></h3>
          <table border=0> 
<%
          while ( keys.hasMoreElements() )
          {
            key   = (String) keys.nextElement();
%>
            <tr>
              <td><b> <%= key %> </b></td>
              <td> =  <%= rundata.getVarDebug().get(key) %> </td>
            <tr>
<%
          }
%>
        </table>
      </td> 
    </tr> 
<% 
  } 
%>

<%-- Stacktrace --%>
  <tr> 
    <td>
      <br>
      <h3><jetspeed:l10n key="ERROR_STACKTRACE_JSP"/></h3>
      <pre>
<%      
        if (rundata.getStackTrace() != null) {
%>
        <%= rundata.getStackTrace() %>
<%      
        }
%>
      </pre>
    </td> 
  </tr> 

</table>