<%@ page import="com.atlassian.jira.upgrade.ConsistencyChecker"%>

<%!
    private void printClass(Class clazz, JspWriter out) throws java.io.IOException {
        ClassLoader cl = clazz.getClassLoader();
        out.println("<tr><td>" + clazz.getName() + "</td><td>" + cl + "</td></tr>");
}
%>
<html><body>
<p><webwork:text name="'admin.debug.page.description'"/></p>
<table>
    <tr><th><webwork:text name="'admin.debug.class'"/></th><th><webwork:text name="'admin.debug.classholder'"/></th></tr>
<%
    printClass(ConsistencyChecker.class, out);
    printClass(org.dom4j.Element.class, out);
    printClass(org.jaxen.dom4j.Dom4jXPath.class, out);
    String clazz = request.getParameter("clazz");
    out.println("<tr><td><form><input type='text' name='clazz' size='50' value='"+(clazz != null ? clazz : "")+"'></form></td><td></td></tr>");
    if (clazz != null) {
        try {
            printClass(Class.forName(clazz), out);
        } catch (ClassNotFoundException e) {
            out.println("<tr><td colspan='3'>Unknown class</a>");
        }
    }
%>
</table>
</body></html>