larryi      2004/01/05 18:21:29

  Modified:    tester/src/tester/org/apache/tester ErrorPage04.java
  Log:
  Port some changes to tester from Tomcat 5. These changes currently leave
  just two failures.
  
  1. The access to "/examples/.." fails the first time tester is run since starting
  Tomcat by returning 200.  Subsequent runs of tester return the expected
  302.
  
  2. For the JspDoc1.jsp test, Jasper condenses "<a></a>" to <a/> within
  <jsp:text> tags, instead of preserving whitespace.  Don't know how easy
  it would be to port changes from Jasper HEAD.  This commit includes
  updating the JspDoc1.txt golden file to that found in the Tomcat 5 tester.
  I believe this should be the expected result for JSP 1.2 too.
  
  Revision  Changes    Path
  1.4       +7 -18     
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ErrorPage04.java
  
  Index: ErrorPage04.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/ErrorPage04.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ErrorPage04.java  26 Apr 2001 16:39:13 -0000      1.3
  +++ ErrorPage04.java  6 Jan 2004 02:21:29 -0000       1.4
  @@ -82,33 +82,22 @@
   
           // Accumulate all the reasons this request might fail
           ServletException exception = null;
  -        Throwable rootCause = null;
           StringBuffer sb = new StringBuffer();
           Object value = null;
   
           value = request.getAttribute("javax.servlet.error.exception");
           if (value == null)
               sb.append(" exception is missing/");
  -        else if (!(value instanceof javax.servlet.ServletException)) {
  +        else if (!(value instanceof org.apache.tester.TesterException)) {
               sb.append(" exception class is ");
               sb.append(value.getClass().getName());
               sb.append("/");
           } else {
  -            exception = (ServletException) value;
  -            rootCause = exception.getRootCause();
  -            if (rootCause == null) {
  -                sb.append(" rootCause is missing/");
  -            } else if (!(rootCause instanceof TesterException)) {
  -                sb.append(" rootCause is ");
  -                sb.append(rootCause.getClass().getName());
  +            TesterException te = (TesterException) value;
  +            if (!"ErrorPage03 Threw Exception".equals(te.getMessage())) {
  +                sb.append(" exception message is ");
  +                sb.append(te.getMessage());
                   sb.append("/");
  -            } else {
  -                TesterException te = (TesterException) rootCause;
  -                if (!"ErrorPage03 Threw Exception".equals(te.getMessage())) {
  -                    sb.append(" exception message is ");
  -                    sb.append(te.getMessage());
  -                    sb.append("/");
  -                }
               }
           }
   
  @@ -121,7 +110,7 @@
               sb.append("/");
           } else {
               Class clazz = (Class) value;
  -            if (!"javax.servlet.ServletException".equals(clazz.getName())) {
  +            if (!"org.apache.tester.TesterException".equals(clazz.getName())) {
                   sb.append(" exception_type class is ");
                   sb.append(clazz.getName());
                   sb.append("/");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to