From: <yo...@us...> - 2009-10-20 14:39:33
|
Revision: 202 http://treebase.svn.sourceforge.net/treebase/?rev=202&view=rev Author: youjun Date: 2009-10-20 14:39:22 +0000 (Tue, 20 Oct 2009) Log Message: ----------- Modified Paths: -------------- trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/WEB-INF/web.xml Added Paths: ----------- trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/uncaughtException.jsp Removed Paths: ------------- trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/login.jsp trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/logout.jsp Modified: trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/WEB-INF/web.xml 2009-10-20 14:34:49 UTC (rev 201) +++ trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/WEB-INF/web.xml 2009-10-20 14:39:22 UTC (rev 202) @@ -82,7 +82,7 @@ <!-- ========================================================== --> <error-page> <exception-type>java.lang.Exception</exception-type> - <location>/WEB-INF/pages/errors/uncaughtException.jsp</location> + <location>/uncaughtException.jsp</location> </error-page> <!-- Internal Server Error --> <error-page> Deleted: trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/login.jsp =================================================================== --- trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/login.jsp 2009-10-20 14:34:49 UTC (rev 201) +++ trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/login.jsp 2009-10-20 14:39:22 UTC (rev 202) @@ -1,14 +0,0 @@ -<%@ include file="/common/taglibs.jsp"%> - -<title><fmt:message key="login.title"/></title> -<content tag="heading"><fmt:message key="login.title"/></content> - -<p>Please fill in following information to login<br/> -<span class="required">* Required Fields</span></p> - -<body id="info"/> - -<!-- loginForm.jsp --> -<c:import url="/WEB-INF/pages/loginForm.jsp"/> -<!-- password --> -<p>Forgot your password? Have your <a href="<c:url value="passwordForm.html"/>">password e-mailed to you</a></p> Deleted: trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/logout.jsp =================================================================== --- trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/logout.jsp 2009-10-20 14:34:49 UTC (rev 201) +++ trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/logout.jsp 2009-10-20 14:39:22 UTC (rev 202) @@ -1 +0,0 @@ -<% session.invalidate(); response.sendRedirect("home.html");%> \ No newline at end of file Added: trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/uncaughtException.jsp =================================================================== --- trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/uncaughtException.jsp (rev 0) +++ trunk/oai-pmh_data_provider/data_provider_web/src/main/webapp/uncaughtException.jsp 2009-10-20 14:39:22 UTC (rev 202) @@ -0,0 +1,46 @@ +<%@ include file="/common/taglibs.jsp" %> + +<title>Java Uncaught Exception</title> +<content tag="heading">Uncaught Exception Encountered</content> + +<p> + +<% +try { + // The Servlet spec guarantees this attribute will be available + Throwable exception = (Throwable) request.getAttribute("javax.servlet.error.exception"); + + if (exception != null) { + if (exception instanceof ServletException) { + // It's a ServletException: we should extract the root cause + ServletException sex = (ServletException) exception; + Throwable rootCause = sex.getRootCause(); + if (rootCause == null) + rootCause = sex; + out.println("** Root cause is: "+ rootCause.getMessage()); + rootCause.printStackTrace(new java.io.PrintWriter(out)); + } + else { + // It's not a ServletException, so we'll just show it + exception.printStackTrace(new java.io.PrintWriter(out)); + } + } + else { + out.println("No error information available"); + } + + // Display cookies + out.println("\nCookies:\n"); + Cookie[] cookies = request.getCookies(); + if (cookies != null) { + for (int i = 0; i < cookies.length; i++) { + out.println(cookies[i].getName() + "=[" + cookies[i].getValue() + "]"); + } + } + +} catch (Exception ex) { + ex.printStackTrace(new java.io.PrintWriter(out)); +} +%> +<p> + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |