jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@hyperreal.org
Subject cvs commit: jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet ClientTest.class Constants.class Constants.class Constants.class MapManager.class MapManagerImpl.class ServletTest.class
Date Tue, 09 Nov 1999 21:12:29 GMT
costin      99/11/09 13:12:24

  Added:       src/server/jsp-tests/WEB-INF/classes/jsp/tags/examples
                        ExampleTagBase.java FooTagExtraInfo.java
                        LifeCycleTag.java PageTag.java TestTag.java
                        TestTagExtraInfo.java
               src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo
                        Logger.class Main.class SocketHelper.class
                        TestResult.class Testable.class TestableBase.class
                        URLHelper.class
               src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/cookie
                        CookieJar.class CookieJarInterface.class
                        HttpCookie.class RfcDateParser.class
                        cookie.properties
               src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp
                        Constants$Config.class Constants$Response.class
                        Constants.class JspCheckTest.class MapManager.class
                        MapManagerImpl.class NegativeJspCheckTest.class
                        PositiveJspCheckTest.class
               src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet
                        ClientTest.class Constants$Config.class
                        Constants$Response.class Constants.class
                        MapManager.class MapManagerImpl.class
                        ServletTest.class
  Log:
  More tests from Vanitha.
  
  Revision  Changes    Path
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/jsp/tags/examples/ExampleTagBase.java
  
  Index: ExampleTagBase.java
  ===================================================================
  package examples;
  
  import javax.servlet.jsp.*;
  import javax.servlet.jsp.tagext.*;
  
  public abstract class ExampleTagBase 
  
  implements Tag {
  
      public void setParent(Tag parent) {
          this.parent = parent;
      }
  
      public void setBodyContent(BodyContent bodyOut) {
          this.bodyOut = bodyOut;
      }
  
      public void setPageContext(PageContext pageContext) {
          this.pageContext = pageContext;
      }
  
      public Tag getParent() {
          return this.parent;
      }
      
      public int doStartTag() throws JspException {
          return SKIP_BODY;
      }
  
      public int doEndTag() throws JspException {
          return EVAL_PAGE;
      }
      
  
      // Default implementations for BodyTag methods as well
      // just in case a tag decides to implement BodyTag.
  
      public void doInitBody() throws JspException {
      }
  
  
  
      public int doAfterBody() throws JspException {
          return SKIP_BODY;
      }
  
      public void release() {
          bodyOut = null;
          pageContext = null;
          parent = null;
      }
      
      protected BodyContent bodyOut;
      protected PageContext pageContext;
      protected Tag parent;
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/jsp/tags/examples/FooTagExtraInfo.java
  
  Index: FooTagExtraInfo.java
  ===================================================================
  package examples;
  
  import javax.servlet.jsp.tagext.*;
  
  public class FooTagExtraInfo extends TagExtraInfo {
      public VariableInfo[] getVariableInfo(TagData data) {
          return new VariableInfo[] 
              {
                  new VariableInfo("member",
                                   "String",
                                   true,
                                   VariableInfo.NESTED)
              };
      }
  }
  
          
  
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/jsp/tags/examples/LifeCycleTag.java
  
  Index: LifeCycleTag.java
  ===================================================================
  package examples;
  
  import javax.servlet.jsp.*;
  import javax.servlet.jsp.tagext.*;
  import java.io.IOException;
  
  /**
   * LifeCycleTag class is used to tests tagext API's 
   */
  public class LifeCycleTag  extends ExampleTagBase 
      implements BodyTag {
  
  
      boolean toBrowser = false;
      String TestString="";
      String endString=" method <br>";
      private String atts1,atts2,atts3,atts4,atts5,atts6;
      int count=0;
     
   
      
      // setting the value from jsp att1,att1 from JSP test case 
      public void setAtt1(String value) {
          atts1 = value;
      }
    
      public String getAtt1() {
      	return atts1;
       }
      
  
      public void setAtt2(String value) {
          atts2 = value;
      }
    
      public String getAtt2() {
      	return atts2;
       }
       
  
      public void setAtt3(String value) {
          atts3 = value;
      }
    
      public String getAtt3() {
      	return atts3;
       }
      
  
      public void setAtt4(String value) {
          atts4 = value;
      }
    
      public String getAtt4() {
      	return atts4;
       }
  
      public void setAtt5(String value) {
          atts5 = value;
      }
    
      public String getAtt5() {
      	return atts5;
       }
      
  
      public void setAtt6(String value) {
          atts6 = value;
      }
    
      public String getAtt6() {
      	return atts6;
       }
       
       
       
       
       
       
  
    
      public void setToBrowser(String value) {
          if (value == null)
              toBrowser = false;
          else if (value.equalsIgnoreCase("true"))
              toBrowser = true;
          else
              toBrowser = false;
      }
  
  // Test for setPageContext in TagSupport class.
  		public void setPageContext(PageContext pc) {
  if ("pageContext".equalsIgnoreCase (this.getAtt1())) {
  	 
  	TestString = TestString + this.getAtt1() + endString;
  	}
  }
  
  	
  // Test for doStartTag method in TagSupport class.
  
      public int doStartTag() {
         if ("doStartTag".equalsIgnoreCase (this.getAtt2())) { 
  	TestString = TestString + this.getAtt2() + endString;
   
   
  } // if condition
  return EVAL_BODY_TAG;
  }
      
  // Test for doInitBody method in BodyTagsupport class     
      public void doInitBody() throws JspException {
         if ("doInitBody".equalsIgnoreCase (this.getAtt3())) { 
  		TestString = TestString + this.getAtt3() + endString;
  		}
  	}
  
  //Test for doAfterBody method in BodyTagSupport class
      
      public int doAfterBody() throws JspException {
          try {
  
         if ("doAfterBody".equalsIgnoreCase (this.getAtt4())) { 
  		TestString = TestString + this.getAtt4() + endString;
          }
              String s = bodyOut.getString();
              System.err.println(s);
              if (false)
              	bodyOut.println(TestString);
              return SKIP_BODY;
          } catch (IOException ex) {
              throw new JspException(ex.toString());
          }
      }
      
  // Test for doEndTag method in BodyTagSupport class
      
      public int doEndTag() throws JspException{
      	
         if ("doEndTag".equalsIgnoreCase (this.getAtt5())) { 
  	TestString = TestString + this.getAtt5() + endString;
  		} 
         return EVAL_PAGE;	
      }	
  
  
  // Test for release method in BodyTagSupport class
  
      public void release() {
         if ("release".equalsIgnoreCase (this.getAtt6())) { 
   	TestString = TestString + this.getAtt6() + endString;
  
         	} 
  
      try {
      
          if (toBrowser)
              bodyOut.println(TestString);
       		bodyOut.writeOut(bodyOut.getEnclosingWriter());
       } catch (IOException ioe) {}
  
      }	
  
  
  
  }
  
      
          
      
  
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/jsp/tags/examples/PageTag.java
  
  Index: PageTag.java
  ===================================================================
  package examples;
  
  
  import javax.servlet.jsp.*;
  import javax.servlet.jsp.tagext.*;
  
  import java.io.IOException;
  
  /**
   * PageTag class is used to tests tagext API's  
   */
  public class PageTag extends ExampleTagBase  implements BodyTag {
      	
      boolean toBrowser = false;
      String TestString="";
      private String atts1,atts2;
      
   
      // setting the value from jsp att1 
      
      
      public void setAtt1(String value) {
          atts1 = value;
      }
    
      public String getAtt1() {
      	return atts1;
       }
      
  
      public void setAtt2(String value) {
          atts2 = value;
      }
    
      public String getAtt2() {
      	return atts2;
       }
  
      
      public void setToBrowser(String value) {
          if (value == null)
              toBrowser = false;
          else if (value.equalsIgnoreCase("true"))
              toBrowser = true;
          else
              toBrowser = false;
      }
  
  // Test for setPageContext in TagSupport class.
  		public void setPageContext(PageContext pc) {
  		pc.setAttribute("name","pageContext");
  		TestString+=pc.getAttribute("name");
  	}
  	
  
  
      public int doStartTag() {
          return EVAL_BODY_TAG;
      }
      
      
      public void doInitBody() throws JspException {
      }
  
  
      
      public int doAfterBody() throws JspException {
          try {
  
  
              String s = bodyOut.getString();
              System.err.println(s);
              if (toBrowser)
              	bodyOut.println(TestString);
       			bodyOut.writeOut(bodyOut.getEnclosingWriter());
              return SKIP_BODY;
          } catch (IOException ex) {
              throw new JspException(ex.toString());
          }
      }
      
  }
  
      
          
      
  
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/jsp/tags/examples/TestTag.java
  
  Index: TestTag.java
  ===================================================================
  package examples;
  
  import javax.servlet.jsp.*;
  import javax.servlet.jsp.tagext.*;
  import java.io.IOException;
  
  /**
   * TestTag class is used to tests tagext API's 
   */
  public class TestTag  extends ExampleTagBase 
      implements BodyTag {
  
  
      boolean toBrowser = false;
      String TestString="";
      private String atts1,atts2;
      int count=0;
     
   
      
      // setting the value from jsp att1,att1 from JSP test case 
      public void setAtt1(String value) {
          atts1 = value;
      }
    
      public String getAtt1() {
      	return atts1;
       }
      
  
      public void setAtt2(String value) {
          atts2 = value;
      }
    
      public String getAtt2() {
      	return atts2;
       }
  
    
      public void setToBrowser(String value) {
          if (value == null)
              toBrowser = false;
          else if (value.equalsIgnoreCase("true"))
              toBrowser = true;
          else
              toBrowser = false;
      }
  
  // Test for setPageContext in TagSupport class.
  		public void setPageContext(PageContext pc) {
  			pc.setAttribute("name","pageContext");
  		}
  	
  // Test for doStartTag method in TagSupport class.
  
      public int doStartTag() {
         if ("doStartTag".equalsIgnoreCase (this.getAtt1())) { 
   
  // Test for methods in variableInfo class.
     
  // Creating a hashttable to be passed TagData constructor, 	
     java.util.Hashtable ht = new java.util.Hashtable();
  	ht.put("a1","98.5");
  	ht.put("a2","107.1");
  	ht.put("a3","105.1");
  
  	TagData td = new TagData(ht);
      	
      TestTagExtraInfo ftet = new TestTagExtraInfo();
      VariableInfo[] vi = ftet.getVariableInfo(td);
      BodyTagSupport bts = new BodyTagSupport();
       	
  	if(this.getAtt2().equals("getClassName")) {
  		TestString = TestString + vi[0].getClassName();
  	} else if (this.getAtt2().equals("getDeclare")) {
  	TestString = TestString + vi[0].getDeclare();
  	} else if (this.getAtt2().equals("getScope")) {
  	TestString = TestString + vi[0].getScope();
  	} else if (this.getAtt2().equals("getVarName")) {
  	TestString = TestString + vi[0].getVarName();
  	}
   
  } // if condition
  return EVAL_BODY_TAG;
  }
      
  // Test for doInitBody method in BodyTagsupport class     
      public void doInitBody() throws JspException {
         if ("doInitBody".equalsIgnoreCase (this.getAtt1())) { 
         	TestString +=this.getAtt1(); } 
  
  // Test for getParent method in TagSupport
  
       	if ("getParent".equalsIgnoreCase (this.getAtt2())) { 
         		TagSupport ts = new TagSupport();
         		setParent(this);
         		Tag tt = getParent();
  			if(tt.toString().regionMatches(true,9,"examples.TestTag",9,7)) { 
         			TestString = TestString + "Pass";
         		}
         		else {	
         			TestString = TestString + "Fails";
         		}
  		}
  	}
  
  //Test for doAfterBody method in BodyTagSupport class
      
      public int doAfterBody() throws JspException {
          try {
  
         if ("doAfterBody".equalsIgnoreCase (this.getAtt1())) { 
              TestString += this.getAtt1();
          }
              String s = bodyOut.getString();
              System.err.println(s);
              if (false)
              	bodyOut.println(TestString);
              return SKIP_BODY;
          } catch (IOException ex) {
              throw new JspException(ex.toString());
          }
      }
      
  // Test for doEndTag method in BodyTagSupport class
      
      public int doEndTag() throws JspException{
      	
         if ("doEndTag".equalsIgnoreCase (this.getAtt1())) { 
         	TestString +=this.getAtt1(); 
  		} 
         return EVAL_PAGE;	
      }	
  
  
  // Test for release method in BodyTagSupport class
  
      public void release() {
         if ("release".equalsIgnoreCase (this.getAtt1())) { 
         	TestString +=this.getAtt1(); } 
  
      try {
      
          if (toBrowser)
              bodyOut.println(TestString);
       		bodyOut.writeOut(bodyOut.getEnclosingWriter());
       } catch (IOException ioe) {}
  
      }	
  
  
  
  }
  
      
          
      
  
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/jsp/tags/examples/TestTagExtraInfo.java
  
  Index: TestTagExtraInfo.java
  ===================================================================
  package examples;
  
  import javax.servlet.jsp.tagext.*;
  
  public class TestTagExtraInfo extends TagExtraInfo {
      public VariableInfo[] getVariableInfo(TagData data) {
      	
           return new VariableInfo[] 
              {
                  new VariableInfo("member",
                                   "String",
                                   true,
                                   VariableInfo.NESTED)
              };
      }
  }
  
          
  
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/Logger.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/Main.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/SocketHelper.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/TestResult.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/Testable.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/TestableBase.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/URLHelper.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/cookie/CookieJar.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/cookie/CookieJarInterface.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/cookie/HttpCookie.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/cookie/RfcDateParser.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/cookie/cookie.properties
  
  Index: cookie.properties
  ===================================================================
  #Proeprty for cookies
  cookies.default.expiration=100
  cookie.acceptpolicy=true
  
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp/Constants$Config.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp/Constants$Response.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp/Constants.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp/JspCheckTest.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp/MapManager.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp/MapManagerImpl.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp/NegativeJspCheckTest.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/jsp/PositiveJspCheckTest.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet/ClientTest.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet/Constants$Config.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet/Constants$Response.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet/Constants.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet/MapManager.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet/MapManagerImpl.class
  
  	<<Binary file>>
  
  
  1.1                  jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/org/apache/tools/moo/servlet/ServletTest.class
  
  	<<Binary file>>
  
  

Mime
View raw message