jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sant...@locus.apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse FlushBufferTestServlet.java GetBufferSizeTestServlet.java GetOutputStream_1TestServlet.java GetWriter_1TestServlet.java IsCommittedTestServlet.java ResetTestServlet.java Reset_1TestServlet.java ServletResponseGetCharacterEncodingTestServlet.java SetBufferSizeTestServlet.java SetBufferSize_1TestServlet.java SetContentLengthTestServlet.java SetContentTypeTestServlet.java SetLocaleTestServlet.java
Date Mon, 16 Oct 2000 22:50:28 GMT
santosh     00/10/16 15:50:28

  Added:       src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse
                        FlushBufferTestServlet.java
                        GetBufferSizeTestServlet.java
                        GetOutputStream_1TestServlet.java
                        GetWriter_1TestServlet.java
                        IsCommittedTestServlet.java ResetTestServlet.java
                        Reset_1TestServlet.java
                        ServletResponseGetCharacterEncodingTestServlet.java
                        SetBufferSizeTestServlet.java
                        SetBufferSize_1TestServlet.java
                        SetContentLengthTestServlet.java
                        SetContentTypeTestServlet.java
                        SetLocaleTestServlet.java
  Log:
  watchdog 4.0
  
  Revision  Changes    Path
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/FlushBufferTestServlet.java
  
  Index: FlushBufferTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/FlushBufferTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $ 
   * $Date: 2000/10/16 22:50:27 $ 
   * $Revision: 1.1 $
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *A Test for ServletResponse.flushBuffer method. 
   */ 
  
  public class FlushBufferTestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		ServletOutputStream sos =null; 
  
  		try {
  			sos = response.getOutputStream();
  			response.setBufferSize(1000);
  			response.setContentType("text/html");
  			sos.println("Testing ServletResponse.flushBuffer() method");
  
  			//after flushing the client should get this
  			response.flushBuffer();
  			sos.close();
  		}catch(Exception e) {
  		}
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/GetBufferSizeTestServlet.java
  
  Index: GetBufferSizeTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/GetBufferSizeTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $ 
   * $Date: 2000/10/16 22:50:27 $ 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *  A Test for ServletResponse.setBufferSize method
   */
  
  public class GetBufferSizeTestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		PrintWriter out = response.getWriter();
  		response.setBufferSize(1000); 
  	
  		// needs to be greater than or equal to SetBufferSize value or zero .
  		if ((response.getBufferSize() >= 1000) || (response.getBufferSize() == 0)){
  			out.println("GetBufferSizeTest test PASSED");
  		}    
  		else {
  			out.println("GetBufferSizeTest test FAILED <BR>");
  			out.println("Expected BufferSize -> >= 1000 or 0 <BR>");
  			out.println("Actual BufferSize -> " + response.getBufferSize());
  		}
      }
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/GetOutputStream_1TestServlet.java
  
  Index: GetOutputStream_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/GetOutputStream_1TestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $
   * $Date: 2000/10/16 22:50:27 $
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  
  package tests.javax_servlet.ServletResponse;
  
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  
  public class GetOutputStream_1TestServlet extends GenericServlet {
  	public void service (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  		/**
  		 *	We will get a PrintWriter object first and we will try to get an OutPutStream 
  		 *	Object. IllegalStateException should be	thrown.
  		 */
  
  		PrintWriter pw=response.getWriter();
  		try {
  			response.getOutputStream();
  			pw.println("GetOutputStream_1Test test FAILED <BR>");
  			pw.println("ServletResponse.getOutputStream() did not throw IllegalStateException <BR>");
  		}catch(IllegalStateException ise) {
  			pw.println("GetOutputStream_1Test test PASSED");
  		}
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/GetWriter_1TestServlet.java
  
  Index: GetWriter_1TestServlet.java
  ===================================================================
  /*
  
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/GetWriter_1TestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $
   * $Date: 2000/10/16 22:50:27 $
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  
  public class GetWriter_1TestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		ServletOutputStream sos = response.getOutputStream();
  		try {
  			PrintWriter out = response.getWriter();
  			sos.println("GetWriter_1Test test FAILED <BR>");
  			sos.println("ServletResponse.getWriter() did not throw IllegalStateException <BR>");
  		}catch(IllegalStateException ise) {
  			sos.println("GetWriter_1Test test PASSED");
  		}
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/IsCommittedTestServlet.java
  
  Index: IsCommittedTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/IsCommittedTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $ 
   * $Date: 2000/10/16 22:50:27 $ 
   * $Revision: 1.1 $
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  Test for ServletResponse.isCommitted() method. 
   *	Before Flushing the buffer, invoke isCommitted, we should get false flushBuffer and try to invoke 
   *      isCommitted we should get true
   */
  
  public class IsCommittedTestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		ServletOutputStream sos = null;
  		try {
  			boolean notYet=false;
  			sos = response.getOutputStream();
  			//set buffer size
  			response.setBufferSize(50);
  
  			//commit the response
  			if(response.isCommitted()==false) notYet=true;
  			response.flushBuffer();
  
  			if(notYet && (response.isCommitted()==true)) {
  				sos.println("IsCommittedTest test PASSED");
  			}
  		}catch(Exception e) {
  		}
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/ResetTestServlet.java
  
  Index: ResetTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/ResetTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $ 
   * $Date: 2000/10/16 22:50:27 $ 
   * $Revision: 1.1 $
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  
  import javax.servlet.ServletRequest;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *  A Test for ServletResponse.reset method
   */
  
  public class ResetTestServlet extends GenericServlet {
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		ServletOutputStream sos = null;
  		try {
  			sos = response.getOutputStream();
  
  			//set buffer size
  			response.setBufferSize(20);
  
  			//Write some data to the stream
  			response.setContentType("text/html");
  
  			// Reset the response
  			response.reset();
  		}catch(Exception e) {
  		}
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/Reset_1TestServlet.java
  
  Index: Reset_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/Reset_1TestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $ 
   * $Date: 2000/10/16 22:50:27 $ 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import javax.servlet.ServletOutputStream;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *	Negative Test for ServletResponse.reset() method.
   */
  
  public class Reset_1TestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		PrintWriter out = response.getWriter();
  		response.setBufferSize(11);		
  		out.println("Tomcat is on the Move");
  		response.flushBuffer();
  		try {     	    
  			response.reset();
  			out.println("Reset_1Test test FAILED");
  		}catch(IllegalStateException e){
  			out.println("Reset_1Test test PASSED");
  		}
  	}
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/ServletResponseGetCharacterEncodingTestServlet.java
  
  Index: ServletResponseGetCharacterEncodingTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/ServletResponseGetCharacterEncodingTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $
   * $Date: 2000/10/16 22:50:27 $
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  
  public class ServletResponseGetCharacterEncodingTestServlet extends GenericServlet {
  
  	public void service (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  		PrintWriter out = response.getWriter();
  		// If not charset is specified, ISO-8859-1 will be used 
  		if(response.getCharacterEncoding()=="ISO-8859-1") {
  			out.println("ServletResponseGetCharacterEncodingTest test PASSED");
  		}
  		else {
  			out.println("ServletResponseGetCharacterEncodingTest test FAILED <BR>");
  			out.println("Expected value -> ISO-8859-1 <BR>");
  			out.println("Actual value got -> " + response.getCharacterEncoding());
  		}
  	}
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetBufferSizeTestServlet.java
  
  Index: SetBufferSizeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetBufferSizeTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $ 
   * $Date: 2000/10/16 22:50:27 $ 
   * $Revision: 1.1 $
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *  A Test for ServletResponse.setBufferSize method
   */
  
  public class SetBufferSizeTestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		PrintWriter out = response.getWriter();
  		response.setBufferSize(1000); 
  	
  		// needs to be greater than or equal to SetBufferSize value or zero
  		if ((response.getBufferSize() >= 1000) || (response.getBufferSize() == 0)){
  			out.println("SetBufferSizeTest test PASSED");
  		}    
  		else {
  			out.println("SetBufferSizeTest test FAILED");
  		}
      }
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetBufferSize_1TestServlet.java
  
  Index: SetBufferSize_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetBufferSize_1TestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $ 
   * $Date: 2000/10/16 22:50:27 $ 
   * $Revision: 1.1 $
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *  Negative Test for ServletResponse.setBufferSize method.
   *  Invoke setBufferSize method, after the content is written using ServletOutputStream.
   *  Test for IllegalStateException error 
   */
  
  public class SetBufferSize_1TestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		PrintWriter out = response.getWriter();
  		ServletOutputStream sos = null;
  		try {
  			sos = response.getOutputStream();
  			sos.println("Good Luck");
  			try {
  				//should IllegalStateException
  				response.setBufferSize(20);
  				out.println("SetBufferSize_1Test test FAILED");
  			}catch(IllegalStateException ise) {
  				out.println("SetBufferSize_1Test test PASSED");
  			}
  		}catch(Exception e) {
  		}
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetContentLengthTestServlet.java
  
  Index: SetContentLengthTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetContentLengthTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $
   * $Date: 2000/10/16 22:50:27 $
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  
  public class SetContentLengthTestServlet extends GenericServlet {
  
  	public void service (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  		response.setContentLength(10);
  	}
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetContentTypeTestServlet.java
  
  Index: SetContentTypeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetContentTypeTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $
   * $Date: 2000/10/16 22:50:27 $
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  
  
  package tests.javax_servlet.ServletResponse;
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /*
  *	SetContentType sets the content type of the response
  *  	Test to check the validity of the method.
  */
  
  public class SetContentTypeTestServlet extends GenericServlet {
  
  	public void service (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  		response.setContentType("text/html");
  	}
  }
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetLocaleTestServlet.java
  
  Index: SetLocaleTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/classes/tests/javax_servlet/ServletResponse/SetLocaleTestServlet.java,v 1.1 2000/10/16 22:50:27 santosh Exp $ 
   * $Date: 2000/10/16 22:50:27 $ 
   * $Revision: 1.1 $
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package tests.javax_servlet.ServletResponse;
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import java.util.Locale;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  A Test for ServletResponse.setLocale method. 
   */ 
  
  public class SetLocaleTestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Locale loc = new Locale("en","US");
  		response.setLocale(loc);	
      }
  }
  
  
  

Mime
View raw message