tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/admin/test test.jsp
Date Fri, 09 Feb 2001 04:03:22 GMT
costin      01/02/08 20:03:22

  Modified:    src/admin/WEB-INF/classes/tadm TomcatAdmin.java
               src/admin/test test.jsp
  Log:
  - the admin taglib will just report that /admin is not trusted, instead
  of the full stack trace (on the null pointer that follows )
  
  - changes needed to run the Gtest
  
  Revision  Changes    Path
  1.10      +4 -5      jakarta-tomcat/src/admin/WEB-INF/classes/tadm/TomcatAdmin.java
  
  Index: TomcatAdmin.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/admin/WEB-INF/classes/tadm/TomcatAdmin.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TomcatAdmin.java	2001/02/07 06:42:48	1.9
  +++ TomcatAdmin.java	2001/02/09 04:03:22	1.10
  @@ -33,6 +33,9 @@
   	    HttpServletRequest req=(HttpServletRequest)pageContext.
   		getRequest();
   	    init(req);
  +	    if( cm==null ) {
  +		return SKIP_BODY;
  +	    }
   	    pageContext.setAttribute("cm", cm);
   	    Context ctx=null;
   	    if( ctxPath==null && ctxPathParam!=null ) {
  @@ -70,10 +73,6 @@
   	return EVAL_PAGE;
       }
       
  -//     public void setPageContext(PageContext pctx ) {
  -// 	this.pageContext=pctx;
  -//     }
  -
       public void setParent( Tag parent ) {
   	super.setParent( parent);
       }
  @@ -84,7 +83,7 @@
       private void init(HttpServletRequest request) {
   	Request realRequest = (Request)
   	    request.getAttribute( Request.ATTRIB_REAL_REQUEST);
  -	if( cm==null )
  +	if( realRequest==null )
   	    pageContext.getServletContext().log("Untrusted Application");
   	else
   	    cm = realRequest.getContext().getContextManager();
  
  
  
  1.12      +16 -16    jakarta-tomcat/src/admin/test/test.jsp
  
  Index: test.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/admin/test/test.jsp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- test.jsp	2001/02/07 06:42:48	1.11
  +++ test.jsp	2001/02/09 04:03:22	1.12
  @@ -56,31 +56,33 @@
   <h1>FAILED Tests</h1>
   
   <adm:iterate name="failures" enumeration="<%= gtestTestFailures.elements() %>"

  -               type="org.apache.tomcat.util.test.GTest" >
  +               type="org.apache.tomcat.util.test.Matcher" >
  +
   <% // Need more tags - if, etc 
   %>
  -<a href='<%= failures.getHttpClient().getURI() %>'> 
  -<font color='red'> FAIL </font></a> ( <%= failures.getDescription()
%> )
  -    <%= failures.getHttpClient().getRequestLine() %>
  +<a href='<%= failures.getHttpRequest().getURI() %>'> 
  +<font color='red'> FAIL </font></a> ( <%=
  +                  failures.getHttpClient().getComment() %> )
  +    <%= failures.getHttpRequest().getRequestLine() %>
   <br>
  -TEST: <%= failures.getMatchDescription() %>
  +TEST: <%= failures.getTestDescription() %>
   <br>
   <b>Request: </b>
   <pre>
  -  <%= failures.getHttpClient().getFullRequest() %>
  +  <%= failures.getHttpRequest().getFullRequest() %>
   </pre>
   <b>Comments: </b>
  -  <%= failures.getComment() %>
  +  <%= failures.getHttpClient().getComment() %>
   <br>
   <b>Message: </b>
   <pre>
  -  <%= failures.getFailureMessage() %>
  +  <%= failures.getMessage() %>
   </pre>
   
   <% // use a tag %>
   <% if( request.getParameter("debug" ) != null ) { %>
     <b>Response status: </b> 
  -  <%= failures.getHttpClient().getResponse().getResponseLine() %>
  +  <%= failures.getHttpResponse().getResponseLine() %>
     <br>
     <b>Response headers: </b>
      (I'm not sure how to do embeded iterations, need JSP expert )
  @@ -88,7 +90,7 @@
     
     <b>Response body: </b>
     <pre>
  -  <%= failures.getHttpClient().getResponse().getResponseBody() %>
  +  <%= failures.getHttpResponse().getResponseBody() %>
     </pre>
   <% } %>  
   
  @@ -100,13 +102,11 @@
   <h1>PASSED Tests</h1>
   
   <adm:iterate name="success" enumeration="<%= gtestTestSuccess.elements() %>" 
  -               type="org.apache.tomcat.util.test.GTest" >
  +               type="org.apache.tomcat.util.test.HttpClient" >
   
  -<a href='<%= success.getHttpClient().getURI() %>'> 
  -OK</a> ( <%= success.getDescription() %> ) 
  -    <%= success.getHttpClient().getRequestLine() %>
  -<br>
  -TEST: <%= success.getMatchDescription() %>
  +<a href='<%= success.getFirstRequest().getURI() %>'> 
  +OK</a> ( <%= success.getComment() %> ) 
  +    <%= success.getFirstRequest().getRequestLine() %>
   <br>
   </adm:iterate>
   </body>
  
  
  

Mime
View raw message