jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vani...@hyperreal.org
Subject cvs commit: jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpUtils GetRequestURLTestServlet.java ParsePostDataTestServlet.java ParsePostData_01TestServlet.java ParseQueryStringTestServlet.java ParseQueryString_01TestServlet.java
Date Tue, 09 Nov 1999 01:39:37 GMT
vanitha     99/11/08 17:39:26

  Added:       src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors
                        ErrorHandlingTestServlet.java
                        ErrorHandling_1TestServlet.java
                        ErrorHandling_2TestServlet.java
                        ErrorHandling_3TestServlet.java JspTestFile.jsp
                        SessionTimeOutTestServlet.java
                        UrlPatternTestServlet.java
                        UrlPattern_1TestServlet.java
                        UrlPattern_2TestServlet.java
                        UrlPattern_3TestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet
                        DestroyTestServlet.java
                        GetServletConfigTestServlet.java
                        GetServletContextTestServlet.java
                        GetServletInfoTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher
                        ForwardTestServlet.java Forward_1TestServlet.java
                        ForwardedServlet.java IncludeTestServlet.java
                        Include_1TestServlet.java IncludedServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet
                        DoDestroyedTestServlet.java DoInit1TestServlet.java
                        DoInit2TestServlet.java DoServiceTestServlet.java
                        DoServletConfigTestServlet.java
                        DoServletInfoTestServlet.java
                        PermanentUnavailabilityTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig
                        GetInitParameterNamesTestServlet.java
                        GetInitParameterNames_1TestServlet.java
                        GetInitParameterTestServlet.java
                        GetInitParameter_1TestServlet.java
                        GetServletContextTestServlet.java
                        GetServletNameTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext
                        GetAttributeNamesTestServlet.java
                        GetAttributeTestServlet.java
                        GetAttribute_1TestServlet.java
                        GetContextTestServlet.java
                        GetContext_1TestServlet.java
                        GetInitParameterNamesTestServlet.java
                        GetInitParameterTestServlet.java
                        GetInitParameter_1TestServlet.java
                        GetMajorVersionTestServlet.java
                        GetMimeTypeTestServlet.java
                        GetMimeType_1TestServlet.java
                        GetMinorVersionTestServlet.java
                        GetNamedDispatcherTestServlet.java
                        GetNamedDispatcher_1TestServlet.java
                        GetRealPathTestServlet.java
                        GetRealPath_1TestServlet.java
                        GetRequestDispatcherTestServlet.java
                        GetRequestDispatcher_1TestServlet.java
                        GetResourceAsStreamTestServlet.java
                        GetResourceAsStream_1TestServlet.java
                        GetResourceTestServlet.java
                        GetResource_1TestServlet.java
                        GetServerInfoTestServlet.java
                        GetServletNamesTestServlet.java
                        GetServletTestServlet.java
                        GetServletsTestServlet.java Log_1TestServlet.java
                        Log_2TestServlet.java Log_3TestServlet.java
                        RemoveAttributeTestServlet.java
                        SetAttributeTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException
                        Constructor1TestServlet.java
                        Constructor2TestServlet.java
                        Constructor3TestServlet.java
                        Constructor4TestServlet.java
                        GetRootCauseTestServlet.java
                        GetRootCause_1TestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletInputStream
                        ReadLineTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream
                        Print1TestServlet.java Print2TestServlet.java
                        Print3TestServlet.java Print4TestServlet.java
                        Print5TestServlet.java Print6TestServlet.java
                        Print7TestServlet.java Println1TestServlet.java
                        Println2TestServlet.java Println3TestServlet.java
                        Println4TestServlet.java Println5TestServlet.java
                        Println6TestServlet.java Println7TestServlet.java
                        Println8TestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest
                        GetAttributeNamesTestServlet.java
                        GetAttributeTestServlet.java
                        GetAttribute_1TestServlet.java
                        GetCharacterEncodingTestServlet.java
                        GetCharacterEncoding_1TestServlet.java
                        GetContentLengthTestServlet.java
                        GetContentLength_1TestServlet.java
                        GetContentTypeTestServlet.java
                        GetContentType_1TestServlet.java
                        GetInputStreamTestServlet.java
                        GetInputStream_1TestServlet.java
                        GetLocaleTestServlet.java
                        GetLocalesTestServlet.java
                        GetLocales_1TestServlet.java
                        GetParameterNamesTestServlet.java
                        GetParameterNames_1TestServlet.java
                        GetParameterTestServlet.java
                        GetParameterValuesTestServlet.java
                        GetParameterValues_1TestServlet.java
                        GetParameter_1TestServlet.java
                        GetProtocolTestServlet.java
                        GetReaderTestServlet.java
                        GetReader_1TestServlet.java
                        GetRealPathTestServlet.java
                        GetRemoteAddrTestServlet.java
                        GetRemoteHostTestServlet.java
                        GetRequestDispatcherTestServlet.java
                        GetSchemeTestServlet.java
                        GetServerNameTestServlet.java
                        GetServerPortTestServlet.java
                        SetAttributeTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse
                        FlushBufferTestServlet.java
                        GetBufferSizeTestServlet.java
                        GetCharacterEncodingTestServlet.java
                        GetOutputStreamTestServlet.java
                        GetOutputStream_1TestServlet.java
                        GetWriterTestServlet.java
                        GetWriter_1TestServlet.java
                        IsCommittedTestServlet.java ResetTestServlet.java
                        Reset_1TestServlet.java
                        SetBufferSizeTestServlet.java
                        SetBufferSize_2TestServlet.java
                        SetContentLengthTestServlet.java
                        SetContentTypeTestServlet.java
                        SetLocaleTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/SingleThreadModel
                        SingleModelTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException
                        Constructor1TestServlet.java
                        Constructor2TestServlet.java
                        Constructor3TestServlet.java
                        Constructor4TestServlet.java
                        GetServletTestServlet.java
                        GetUnavailableSecondsTestServlet.java
                        GetUnavailableSeconds_1TestServlet.java
                        GetUnavailableSeconds_3TestServlet.java
                        GetUnavailableSeconds_4TestServlet.java
                        IsPermanentTestServlet.java
                        IsPermanent_1TestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie
                        ConstructorTestServlet.java
                        Constructor_1TestServlet.java
                        CookieCloneTestServlet.java
                        GetCommentTestServlet.java
                        GetComment_01TestServlet.java
                        GetDomainTestServlet.java
                        GetDomain_1TestServlet.java
                        GetMaxAgeTestServlet.java
                        GetMaxAge_1TestServlet.java GetNameTestServlet.java
                        GetPathTestServlet.java GetPath_1TestServlet.java
                        GetSecureTestServlet.java GetValueTestServlet.java
                        GetVersionTestServlet.java
                        SetCommentTestServlet.java
                        SetDomainTestServlet.java SetMaxAgeTestServlet.java
                        SetPathTestServlet.java SetSecureTestServlet.java
                        SetValueTestServlet.java SetVersionTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest
                        GetAuthTypeTestServlet.java
                        GetContextPathTestServlet.java
                        GetCookiesTestServlet.java
                        GetCookies_01TestServlet.java
                        GetDateHeaderTestServlet.java
                        GetDateHeader_01TestServlet.java
                        GetDateHeader_02TestServlet.java
                        GetHeaderNamesTestServlet.java
                        GetHeaderTestServlet.java
                        GetHeader_01TestServlet.java
                        GetHeadersTestServlet.java
                        GetHeaders_01TestServlet.java
                        GetIntHeaderTestServlet.java
                        GetIntHeader_1TestServlet.java
                        GetIntHeader_2TestServlet.java
                        GetMethodTestServlet.java
                        GetMethod_HEADTestServlet.java
                        GetMethod_POSTTestServlet.java
                        GetPathInfoTestServlet.java
                        GetPathInfo_01TestServlet.java
                        GetPathTranslatedTestServlet.java
                        GetQueryStringTestServlet.java
                        GetQueryString_01TestServlet.java
                        GetRemoteUserTestServlet.java
                        GetRequestURITestServlet.java
                        GetRequestedSessionIdTestServlet.java
                        GetServletPathTestServlet.java
                        GetSession_01TestServlet.java
                        GetUserPrincipalTestServlet.java
                        IsRequestedSessionIdFromCookieTestServlet.java
                        IsRequestedSessionIdFromURLTestServlet.java
                        IsRequestedSessionIdFromURL_2TestServlet.java
                        IsRequestedSessionIdValidTestServlet.java
                        IsUserInRoleTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse
                        AddCookieTestServlet.java
                        AddDateHeaderTestServlet.java
                        AddDateHeader_1TestServlet.java
                        AddHeaderTestServlet.java
                        AddHeader_1TestServlet.java
                        AddIntHeaderTestServlet.java
                        AddIntHeader_1TestServlet.java
                        ContainsHeaderTestServlet.java
                        ContainsHeader_01TestServlet.java
                        EncodeRedirectURLTestServlet.java
                        EncodeRedirectURL_2TestServlet.java
                        EncodeURLTestServlet.java
                        EncodeURL_2TestServlet.java
                        RedirectedTestServlet.java
                        SendErrorTestServlet.java
                        SendError_01TestServlet.java
                        SendRedirectTestServlet.java
                        SendRedirect_1TestServlet.java
                        SetDateHeaderTestServlet.java
                        SetDateHeader_1TestServlet.java
                        SetHeaderTestServlet.java
                        SetHeader_1TestServlet.java
                        SetIntHeaderTestServlet.java
                        SetIntHeader_1TestServlet.java
                        SetStatusTestServlet.java
                        SetStatus_1TestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpSession
                        GetAttributeNamesTestServlet.java
                        GetAttributeNames_01TestServlet.java
                        GetAttributeTestServlet.java
                        GetAttribute_01TestServlet.java
                        GetAttribute_02TestServlet.java
                        GetCreationTimeTestServlet.java
                        GetIdTestServlet.java
                        GetLastAccessedTimeTestServlet.java
                        GetMaxInactiveIntervalTestServlet.java
                        GetMaxInactiveInterval_01TestServlet.java
                        GetSessionContextTestServlet.java
                        GetValueNamesTestServlet.java
                        GetValueNames_01TestServlet.java
                        GetValueTestServlet.java
                        GetValue_01TestServlet.java
                        GetValue_02TestServlet.java
                        InvalidateTestServlet.java IsNewTestServlet.java
                        IsNew_01TestServlet.java PutValueTestServlet.java
                        PutValue_01TestServlet.java
                        PutValue_02TestServlet.java
                        RemoveAttributeTestServlet.java
                        RemoveAttribute_01TestServlet.java
                        RemoveAttribute_02TestServlet.java
                        RemoveValueTestServlet.java
                        RemoveValue_01TestServlet.java
                        RemoveValue_02TestServlet.java
                        SetAttributeTestServlet.java
                        SetAttribute_01TestServlet.java
                        SetMaxInactiveIntervalTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpSessionBindingEvent
                        GetNameTestServlet.java GetSessionTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpSessionBindingListener
                        ListenerCheck.java ValueBoundTestServlet.java
                        ValueUnboundTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpSessionContext
                        GetIdsTestServlet.java GetSessionTestServlet.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpUtils
                        GetRequestURLTestServlet.java
                        ParsePostDataTestServlet.java
                        ParsePostData_01TestServlet.java
                        ParseQueryStringTestServlet.java
                        ParseQueryString_01TestServlet.java
  Log:
  Added new Servlet Watchdog tests
  
  Revision  Changes    Path
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/ErrorHandlingTestServlet.java
  
  Index: ErrorHandlingTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/ErrorHandlingTestServlet.java,v 1.1 1999/11/09 01:26:43 vanitha Exp $
   * $Date: 1999/11/09 01:26:43 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *	Test for error-code Element
   */
  
  
  public class ErrorHandlingTestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "ErrorHandlingTestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "ErrorHandlingTestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = " ";
  		String status = "true";
  
  		//playing it safe
  
  	//	response.sendError(500,"Nothing Wrong");
  
  		return props;
  
  	}
  
  	public void service(HttpServletRequest request,HttpServletResponse response) {
  		
  		try {
  
  			PrintWriter pw = response.getWriter();
  
  			response.setStatus(404);
  			response.sendError(404,"Nothing Wrong");
  
  		}catch(IOException ioe) {
  		}
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/ErrorHandling_1TestServlet.java
  
  Index: ErrorHandling_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/ErrorHandling_1TestServlet.java,v 1.1 1999/11/09 01:26:48 vanitha Exp $
   * $Date: 1999/11/09 01:26:48 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  import java.io.FileNotFoundException;
  
  /**
   *	Test for exception-type Element
   */
  
  
  public class ErrorHandling_1TestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "ErrorHandling_1TestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "ErrorHandling_1TestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = " ";
  		String status = "true";
  
  		response.sendError(503,"Error");
  
  		throw new UnavailableException("Test");
  
  	}
  
  /*	public void service(HttpServletRequest request,HttpServletResponse response) {
  		try {
  			
  			PrintWriter pw = response.getWriter();
  			response.setContentType("text/html");
  			pw.println("File Not Found");
  			pw.close();
  
  			response.sendError(503,"UnavailableException");
  
  			throw new FileNotFoundException("Test");
  
  		}catch(IOException ioe) {
  		}
  		catch(RuntimeException re) {
  		}
  	}*/
  } 
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/ErrorHandling_2TestServlet.java
  
  Index: ErrorHandling_2TestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/ErrorHandling_2TestServlet.java,v 1.1 1999/11/09 01:26:52 vanitha Exp $
   * $Date: 1999/11/09 01:26:52 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *	Test for exception-type Element
   */
  
  
  public class ErrorHandling_2TestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "ErrorHandling_1TestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "ErrorHandling_2TestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  		Properties props = null;
  
  		return props;
  
  	}
  
  	public void service(HttpServletRequest request,HttpServletResponse response) {
  		try {
  			
  			response.setContentType("text/html");
  			PrintWriter pw = response.getWriter();
  			pw.println("Noting Wrong");
  			pw.println("All is Well");
  			response.sendError(503,"UnavailableException");
  			pw.close();
  
  		}catch(IOException ioe) {
  		}
  		catch(RuntimeException re) {
  		}
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/ErrorHandling_3TestServlet.java
  
  Index: ErrorHandling_3TestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/ErrorHandling_3TestServlet.java,v 1.1 1999/11/09 01:26:54 vanitha Exp $
   * $Date: 1999/11/09 01:26:54 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  import java.io.FileNotFoundException;
  
  /**
   *	Test for exception-type Element
   */
  
  
  public class ErrorHandling_3TestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "ErrorHandling_3TestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "ErrorHandling_3TestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		response.sendError(500,"InternalServerError");
  
  		throw new FileNotFoundException("Test");
  
  	}
  
  	public void service(HttpServletRequest request,HttpServletResponse response) {
  		try {
  			
  			PrintWriter pw = response.getWriter();
  			response.setContentType("text/html");
  			pw.println("File Not Found");
  
  			//response.sendError(503,"UnavailableException");
  
  			response.setStatus(404);
  			response.sendError(404,"File Not Found");
  
  			throw new FileNotFoundException("Test");
  
  		}catch(IOException ioe) {
  		}
  		catch(RuntimeException re) {
  		}
  	}
  } 
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/JspTestFile.jsp
  
  Index: JspTestFile.jsp
  ===================================================================
  <Html>
  	<Body>
  		<%out.println("Hi There")%>
  	</Body>
  </Html>
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/SessionTimeOutTestServlet.java
  
  Index: SessionTimeOutTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/SessionTimeOutTestServlet.java,v 1.1 1999/11/09 01:27:01 vanitha Exp $
   * $Date: 1999/11/09 01:27:01 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.FileNotFoundException;
  
  /**
   *	Test for session-timeout Element
   */
  
  
  public class SessionTimeOutTestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "SessionTimeOutTestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "SessionTimeOutTestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem with session-tiimout tag ";
  		String status = "false";
  
  		HttpSession session = request.getSession(true);
  
  		if(session.getMaxInactiveInterval()==60) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status,status);
  		props.put(Constants.Response.Message,msg);
  
  		return props;
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/UrlPatternTestServlet.java
  
  Index: UrlPatternTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/UrlPatternTestServlet.java,v 1.1 1999/11/09 01:27:03 vanitha Exp $
   * $Date: 1999/11/09 01:27:03 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.FileNotFoundException;
  
  /**
   *	Test for url-pattern element
   */
  
  
  public class UrlPatternTestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "UrlPatternTestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "UrlPatternTestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  	/**
  	 *	If we get here,we can pass the test case
  	 */
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "OK";
  		String status = "true";
  
  		props.put(Constants.Response.Status,status);
  		props.put(Constants.Response.Message,msg);
  
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/UrlPattern_1TestServlet.java
  
  Index: UrlPattern_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/UrlPattern_1TestServlet.java,v 1.1 1999/11/09 01:27:07 vanitha Exp $
   * $Date: 1999/11/09 01:27:07 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.FileNotFoundException;
  
  /**
   *	Test for url-pattern element
   */
  
  
  public class UrlPattern_1TestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "UrlPattern_1TestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "UrlPattern_1TestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  	/**
  	 *	If we get here,we can pass the test case
  	 */
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "OK";
  		String status = "true";
  
  		props.put(Constants.Response.Status,status);
  		props.put(Constants.Response.Message,msg);
  
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/UrlPattern_2TestServlet.java
  
  Index: UrlPattern_2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/UrlPattern_2TestServlet.java,v 1.1 1999/11/09 01:27:09 vanitha Exp $
   * $Date: 1999/11/09 01:27:09 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.FileNotFoundException;
  
  /**
   *	Test for url-pattern element
   */
  
  
  public class UrlPattern_2TestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "UrlPattern_2TestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "UrlPattern_2TestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  	/**
  	 *	If we get here,we can pass the test case
  	 */
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "OK";
  		String status = "true";
  
  		props.put(Constants.Response.Status,status);
  		props.put(Constants.Response.Message,msg);
  
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/UrlPattern_3TestServlet.java
  
  Index: UrlPattern_3TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/deployment-descriptors/UrlPattern_3TestServlet.java,v 1.1 1999/11/09 01:27:13 vanitha Exp $
   * $Date: 1999/11/09 01:27:13 $
   *
   * 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.deployment_descriptor;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.FileNotFoundException;
  
  /**
   *	Test for url-pattern element
   */
  
  
  public class UrlPattern_3TestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "UrlPattern_3TestServlet";
  	}
  
  	public String getDescription() {
  		
  		return "UrlPattern_3TestServlet";
  
  	}
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  
  
  	/**
  	 *	If we get here,we can pass the test case
  	 */
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "OK";
  		String status = "true";
  
  		props.put(Constants.Response.Status,status);
  		props.put(Constants.Response.Message,msg);
  
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet/DestroyTestServlet.java
  
  Index: DestroyTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet/DestroyTestServlet.java,v 1.1 1999/11/09 01:27:47 vanitha Exp $
   * $Date: 1999/11/09 01:27:47 $
   *
   * 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.GenericServlet;
  
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  
  public class DestroyTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "DestroyTestServlet";
  	}
  
  	public String getDescription() {
  		return "DestroyTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "OK";
  		String status = "true";
  
  		//not needed
  		destroy();
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet/GetServletConfigTestServlet.java
  
  Index: GetServletConfigTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet/GetServletConfigTestServlet.java,v 1.1 1999/11/09 01:27:54 vanitha Exp $
   * $Date: 1999/11/09 01:27:54 $
   *
   * 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.GenericServlet;
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for GetServletConfig
   */
  
  public class GetServletConfigTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetServletConfigTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletConfigTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem Getting ServletConfig";
  		String status = "false";
  
  		if(getServletConfig()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet/GetServletContextTestServlet.java
  
  Index: GetServletContextTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet/GetServletContextTestServlet.java,v 1.1 1999/11/09 01:28:01 vanitha Exp $
   * $Date: 1999/11/09 01:28:01 $
   *
   * 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.GenericServlet;
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class GetServletContextTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetServletContextTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletContextTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem Getting ServletContext";
  		String status = "false";
  
  		if(getServletContext()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet/GetServletInfoTestServlet.java
  
  Index: GetServletInfoTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/GenericServlet/GetServletInfoTestServlet.java,v 1.1 1999/11/09 01:28:06 vanitha Exp $
   * $Date: 1999/11/09 01:28:06 $
   *
   * 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.GenericServlet;
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class GetServletInfoTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetServletInfoTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletInfoTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting ServletInfo";
  		String status = "false";
  
  		if(getServletInfo()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/ForwardTestServlet.java
  
  Index: ForwardTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/ForwardTestServlet.java,v 1.1 1999/11/09 01:28:32 vanitha Exp $
   * $Date: 1999/11/09 01:28:32 $
   *
   * 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.RequestDispatcher;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.RequestDispatcher;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for forward(ServletRequest,ServletResponse) method
   *	@author Nikesh Anand
   */
  
  
  public class ForwardTestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "ForwardTestServlet";
  	}
  
  	public String getDescription() {
  		return "ForwardTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  
  		try {
  
  			try {
  
  
  				String path="/servlet/tests.javax_servlet.RequestDispatcher.ForwardedServlet";
  				RequestDispatcher rd = getServletContext().getRequestDispatcher(path);
  				rd.forward(request,response);
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  				response.sendError(500);
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  
  			}
  
  		}catch(Exception e) {}	
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/Forward_1TestServlet.java
  
  Index: Forward_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/Forward_1TestServlet.java,v 1.1 1999/11/09 01:28:39 vanitha Exp $
   * $Date: 1999/11/09 01:28:39 $
   *
   * 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.RequestDispatcher;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *	Negative Test for forward(ServletRequest,ServletResponse) method
   *	@author Nikesh Anand
   */
  
  
  public class Forward_1TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Forward_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "Forward_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  		Properties props = new Properties();
  
  		try {
  
  			PrintWriter pw = response.getWriter();
  
  			//response is committed here
  
  			pw.println("Committed");
  
  				String 	path="/servlet/tests.javax_servlet.RequestDispatcher.ForwardedServlet";
  				RequestDispatcher rd = getServletContext().getRequestDispatcher(path);
  
  			try {
  
  				rd.forward(request,response);
  				
  			}catch(IllegalStateException ise) {
  
  				pw.println("Passed");
  			}
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  	}	
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/ForwardedServlet.java
  
  Index: ForwardedServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/ForwardedServlet.java,v 1.1 1999/11/09 01:28:44 vanitha Exp $
   * $Date: 1999/11/09 01:28:44 $
   *
   * 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.RequestDispatcher;
  
  
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *	Helper Class ForwardTestServlet calls this servlet
   *	@author Nikesh Anand
   */
  
  
  public class ForwardedServlet extends GenericServlet {
  
  
  	public void service(ServletRequest request,ServletResponse response) throws ServletException,IOException {
  
  		PrintWriter pw = response.getWriter();
  
  		//printing Way Ahead 
  		//client will check for this message
  
  		pw.write("Way Ahead");
  		pw.flush();
  		pw.close();
  	}
  }
  
  
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/IncludeTestServlet.java
  
  Index: IncludeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/IncludeTestServlet.java,v 1.1 1999/11/09 01:28:49 vanitha Exp $
   * $Date: 1999/11/09 01:28:49 $
   *
   * 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.RequestDispatcher;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.RequestDispatcher;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for Include(ServletRequest,ServletResponse) method
   *	@author Nikesh Anand R
   */
  
  
  public class IncludeTestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "IncludeTestServlet";
  	}
  
  	public String getDescription() {
  		return "IncludeTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  
  		try {
  
  			try {
  
  
  				//Absolute path of the servlet
  				// servlet 2.2 provides a bettet way to
  				// avoid this
  
  				String path="/servlet/tests.javax_servlet.RequestDispatcher.IncludedServlet";
  				RequestDispatcher rd = getServletContext().getRequestDispatcher(path);
  				rd.include(request,response);
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  				response.sendError(500);
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  
  			}
  
  		}catch(Exception e) {}	
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/Include_1TestServlet.java
  
  Index: Include_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/Include_1TestServlet.java,v 1.1 1999/11/09 01:28:55 vanitha Exp $
   * $Date: 1999/11/09 01:28:55 $
   *
   * 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.RequestDispatcher;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.RequestDispatcher;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for include(ServletRequest,ServletResponse) 
   *	@author Nikesh Anand R
   */
  
  
  public class Include_1TestServlet extends ServletTest { 
  
  /**
   *	The included servlet is not supposed to change the
   *	Response Headers. Our included servlet changes it
   *	we will check whether that changed header value
   *	gets reflected in the client side or not
   */
  
  	public String getTitle() { 
  
  		return "Include_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "Include_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  
  		try {
  
  			try {
  
  
  				//setting content-type to text/plain
  
  				response.setContentType("text/plain");
  
  				String path="/servlet/tests.javax_servlet.RequestDispatcher.IncludedServlet";
  				RequestDispatcher rd = getServletContext().getRequestDispatcher(path);
  				rd.include(request,response);
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  				response.sendError(500);
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  
  			}
  
  		}catch(Exception e) {}	
  	}
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/IncludedServlet.java
  
  Index: IncludedServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/RequestDispatcher/IncludedServlet.java,v 1.1 1999/11/09 01:29:02 vanitha Exp $
   * $Date: 1999/11/09 01:29:02 $
   *
   * 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.RequestDispatcher;
  
  
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *	Helper class 
   *	@author Nikesh Anand
   */
  
  
  public class IncludedServlet extends GenericServlet {
  
  
  	public void service(ServletRequest request,ServletResponse response) throws ServletException,IOException {
  
  		PrintWriter pw = response.getWriter();
  
  		//change Header 
  		//actually should not
  
  		response.setContentType("text/html");
  
  		pw.write("Way Ahead");
  		pw.flush();
  		pw.close();
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoDestroyedTestServlet.java
  
  Index: DoDestroyedTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoDestroyedTestServlet.java,v 1.1 1999/11/09 01:29:28 vanitha Exp $
   * $Date: 1999/11/09 01:29:28 $
   *
   * 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.Servlet;
  
  
  import org.apache.tools.moo.servlet.CoreServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for destroy Method
   */
  
  
  public class DoDestroyedTestServlet extends CoreServletTest {
  
  
  /**
   *	Setting bool var to true destroy method of CoreServlet
   *	if servlet is destroyed it should not be allowed to
   *	enter service
   */
  
  	public String getTitle() {
  
  		return "DoDestroyedTestServlet";
  	}
  
  	public String getDescription() {
  		return "DoDestroyedTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg="OK";
  		String status="true";
  
  		//checking whether destroy is called before this
  
  		if(isDestroyed()) {
  
  			 msg = "Problem with Servlet LifeCycle";
  			 status = "false";
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoInit1TestServlet.java
  
  Index: DoInit1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoInit1TestServlet.java,v 1.1 1999/11/09 01:29:34 vanitha Exp $
   * $Date: 1999/11/09 01:29:34 $
   *
   * 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.Servlet;
  
  
  import org.apache.tools.moo.servlet.CoreServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Negative Test for Servlet.init(ServletConfig) method
   */
  
  
  public class DoInit1TestServlet extends CoreServletTest {
  
  /**
   *	We will throw UnavailableException from inside init
   *	The servlet Should not be initialized
   */
  
  	public void init(ServletConfig sc) throws ServletException {
  
  		throw new UnavailableException(this,"Negative Init Test");
  	}
  
  	public String getTitle() {
  
  		return "DoInit1TestServlet";
  	}
  
  	public String getDescription() {
  		return "DoInit1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		//oops its a Fault Tolerant Servlet
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to prevent servlet from initializing ";
  		String status = "false";
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoInit2TestServlet.java
  
  Index: DoInit2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoInit2TestServlet.java,v 1.1 1999/11/09 01:29:40 vanitha Exp $
   * $Date: 1999/11/09 01:29:40 $
   *
   * 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.Servlet;
  
  
  import org.apache.tools.moo.servlet.CoreServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for init(ServletConfig) method
   */
  
  
  public class DoInit2TestServlet extends CoreServletTest {
  
  /**
   *	inside coreServletTest we are implementing
   *	init(ServletConfig) and setting a bool var
   *	to true
   *	we'll check for that here
   */
  
  	public String getTitle() {
  
  		return "DoInit2TestServlet";
  	}
  
  	public String getDescription() {
  		return "DoInit2TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem with servlet life cycle";
  		String status = "false";
  
  		//isInit() should return true
  
  		if(isInit()) {
  
  			msg="OK";
  			status="true";
  		}//problem with LifeCycle
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoServiceTestServlet.java
  
  Index: DoServiceTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoServiceTestServlet.java,v 1.1 1999/11/09 01:29:45 vanitha Exp $
   * $Date: 1999/11/09 01:29:45 $
   *
   * 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.Servlet;
  
  
  import org.apache.tools.moo.servlet.CoreServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for service(ServletRequest,ServletResponse) method
   */
  
  
  public class DoServiceTestServlet extends CoreServletTest {
  
  /**
   *	We1'll override init method and assign some value to the String
   *	We'll check for that value in the service method
   */
  
  	String precedence;
  
  	public void init(ServletConfig sc) throws ServletException {
  
  		super.init(sc);
  		precedence="init";
  	}
  
  	public String getTitle() {
  
  		return "DoServiceTestServlet";
  	}
  
  	public String getDescription() {
  		return "DoServiceTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem with servlet life cycle";
  		String status = "false";
  
  		if(precedence.equals("init")) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoServletConfigTestServlet.java
  
  Index: DoServletConfigTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoServletConfigTestServlet.java,v 1.1 1999/11/09 01:29:52 vanitha Exp $
   * $Date: 1999/11/09 01:29:52 $
   *
   * 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.Servlet;
  
  
  import org.apache.tools.moo.servlet.CoreServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getServletConfig method
   */
  
  public class DoServletConfigTestServlet extends CoreServletTest {
  
  /**
   *	getServletConfig gives the ServletConfig object
   * 	that is passed to the init method by the engine
   */
  
  	public String getTitle() {
  
  		return "DoServletConfigTestServlet";
  	}
  
  	public String getDescription() {
  		return "DoServletConfigTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem Getting ServletConfig";
  		String status = "false";
  
  		if(getServletConfig()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoServletInfoTestServlet.java
  
  Index: DoServletInfoTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/DoServletInfoTestServlet.java,v 1.1 1999/11/09 01:29:56 vanitha Exp $
   * $Date: 1999/11/09 01:29:56 $
   *
   * 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.Servlet;
  
  
  import org.apache.tools.moo.servlet.CoreServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class DoServletInfoTestServlet extends CoreServletTest {
  
  	public String getTitle() {
  
  		return "DoServletInfoTestServlet";
  	}
  
  	public String getDescription() {
  		return "DoServletInfoTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting ServletInfo";
  		String status = "false";
  
  		if(getServletInfo()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/PermanentUnavailabilityTestServlet.java
  
  Index: PermanentUnavailabilityTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/Servlet/PermanentUnavailabilityTestServlet.java,v 1.1 1999/11/09 01:30:02 vanitha Exp $
   * $Date: 1999/11/09 01:30:02 $
   *
   * 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.Servlet;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import javax.servlet.UnavailableException;
  import java.io.IOException;
  
  /**
   *	A Test for servlet Life Cycle
   *	@author Nikesh Anand
   */
  
  
  public class PermanentUnavailabilityTestServlet extends ServletTest {
  
  	/**
  	 *	By passing  ServletTest's service method
  	 *
  	 */
  
  /*	public void service(ServletRequest request,ServletResponse response) throws ServletException {
  
  		System.out.println("Iam not feeling well");
  		throw new UnavailableException("Sorry :Iam undergoing a Diagnosis");
  	}*/
  
  	public String getTitle() {
  
  		return "PermanantUnavailabilityTestServlet";
  	}
  
  	public String getDescription() {
  		return "PermanentUnavailabilityTestServlet";
  	}
  
  	//dummy
  
  	public Properties doTest (HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException {
  
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		throw new UnavailableException("Sorry :Iam undergoing a Diagnosis");
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetInitParameterNamesTestServlet.java
  
  Index: GetInitParameterNamesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetInitParameterNamesTestServlet.java,v 1.1 1999/11/09 01:30:14 vanitha Exp $
   * $Date: 1999/11/09 01:30:14 $
   *
   * 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.ServletConfig;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	Test for getInitParameter(String) method
   */
  
  
  public class GetInitParameterNamesTestServlet extends ServletTest {
  
  
  /**
   *	getInitParameterNames returns an Enumeration of values
   *	associated with the init parameters
   */
  	public String getTitle() {
  
  		return "GetInitParameterNamesTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetInitParameterNamesTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting init param names";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		Enumeration enum = config.getInitParameterNames();
  
  		int count =0;
  
  		//count should be 2
  
  		while(enum.hasMoreElements()) {
  
  			enum.nextElement();
  			count++;
  		}
  
  		if(count==2) {
  
  			count=0;
  
  			enum = config.getInitParameterNames();
  
  			while(enum.hasMoreElements()) {
  
  				String name=(String)enum.nextElement();
  
  				if(name.equals("Team")||name.equals("org")) {
  
  					msg="OK";
  					status="true";
  					count++;
  				}
  				else {
  
  					msg="Problem getting InitParam Names";
  					status="false";
  				}
  			}
  			if(count!=2) {
  
  				status="false";
  				msg="problem gettting InitParam Names";
  			}
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetInitParameterNames_1TestServlet.java
  
  Index: GetInitParameterNames_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetInitParameterNames_1TestServlet.java,v 1.1 1999/11/09 01:30:18 vanitha Exp $
   * $Date: 1999/11/09 01:30:18 $
   *
   * 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.ServletConfig;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	Negative Test for getInitParameterNames() method
   */
  
  
  public class GetInitParameterNames_1TestServlet extends ServletTest {
  
  /**
   *	getInitParameterNames returns an Enumeration of values
   *	associated with the init parameters
   */
  
  	public String getTitle() {
  
  		return "GetInitParameterNames_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetInitParameterNames_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Invalid no of init param names";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		Enumeration enum= config.getInitParameterNames();
  
  		//we set nothing
  		//We cannot ask for something we don't deserve
  
  		if(!enum.hasMoreElements()) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetInitParameterTestServlet.java
  
  Index: GetInitParameterTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetInitParameterTestServlet.java,v 1.1 1999/11/09 01:30:22 vanitha Exp $
   * $Date: 1999/11/09 01:30:22 $
   *
   * 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.ServletConfig;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	Test for getInitParameter(String)
   */
  
  public class GetInitParameterTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetInitParameterTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetInitParameterTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting init params";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		//we associated WebAccess with Team
  
  		String initParam = config.getInitParameter("Team");
  
  		if(initParam!=null) {
  
  			if(initParam.equals("WebAccess")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetInitParameter_1TestServlet.java
  
  Index: GetInitParameter_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetInitParameter_1TestServlet.java,v 1.1 1999/11/09 01:30:24 vanitha Exp $
   * $Date: 1999/11/09 01:30:24 $
   *
   * 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.ServletConfig;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Negative Test for getInitParameter(String) method
   */
  
  
  public class GetInitParameter_1TestServlet extends ServletTest {
  
  /**
   *	getInitParameter(String name) gives the value
   *	that is associated with the names during deployment
   *	of the servlet
   */
  
  	public String getTitle() {
  
  		return "GetInitParameter_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetInitParameter_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  /**
   *	We will try this method with a bogus param
   *	We expect null as an output
   */
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Invalid value:Null expected";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		String initParam = config.getInitParameter("Mono Phosphate");
  
  		if(initParam==null) {
  
  			status="true";
  			msg="OK";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetServletContextTestServlet.java
  
  Index: GetServletContextTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetServletContextTestServlet.java,v 1.1 1999/11/09 01:30:28 vanitha Exp $
   * $Date: 1999/11/09 01:30:28 $
   *
   * 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.ServletConfig;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getServletContext method
   */
  
  
  public class GetServletContextTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetServletContextTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletContextTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting ServletContext";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		//we expect a not null value
  
  		ServletContext context = config.getServletContext();
  
  		if(context!=null) {
  
  			msg="Ok";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetServletNameTestServlet.java
  
  Index: GetServletNameTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletConfig/GetServletNameTestServlet.java,v 1.1 1999/11/09 01:30:35 vanitha Exp $
   * $Date: 1999/11/09 01:30:35 $
   *
   * 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.ServletConfig;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	Test for  getServletName()
   */
  
  public class GetServletNameTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetServletNameTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletNameTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting ServletName";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		//get this servlets name:servlets way
  
  		String servletName = getServletName();
  
  		//get this class name : The pure java way.
  
  		String origName=this.getClass().getName();
  
  		if(servletName.equals("GetServletNameTest")) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetAttributeNamesTestServlet.java
  
  Index: GetAttributeNamesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetAttributeNamesTestServlet.java,v 1.1 1999/11/09 01:30:46 vanitha Exp $
   * $Date: 1999/11/09 01:30:46 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getAttributeNames method
   */
  
  
  public class GetAttributeNamesTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetAttributeNamesTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetAttributeNamesTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting attribute names";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		//first we have to Set Attributes
  
  		context.setAttribute("Chef","expert");
  
  		context.setAttribute("chief","commanding");
  
  		//then get Attributes
  		Enumeration enum = context.getAttributeNames();
  
  		int count=0;
  
  		while(enum.hasMoreElements()) {
  
  			count++;
  			enum.nextElement();
  		}
  
  		//some more context attrs may be in the context
  		// so safely checking for >=2
  
  		if(count>=2) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetAttributeTestServlet.java
  
  Index: GetAttributeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetAttributeTestServlet.java,v 1.1 1999/11/09 01:30:49 vanitha Exp $
   * $Date: 1999/11/09 01:30:49 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getAttribute(String) method
   */
  
  
  public class GetAttributeTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetAttributeTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetAttributeTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to return the Attribute properly";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//first set attribute
  
  		context.setAttribute("Mankind","humane");
  
  		//then get attr
  		Object attr = context.getAttribute("Mankind");
  
  		if(attr!=null) {
  
  			//should be ana instance of java.lang.String
  
  			if(attr.getClass().getName().equals("java.lang.String")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetAttribute_1TestServlet.java
  
  Index: GetAttribute_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetAttribute_1TestServlet.java,v 1.1 1999/11/09 01:30:51 vanitha Exp $
   * $Date: 1999/11/09 01:30:51 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getAttribute(String) method
   */
  
  
  public class GetAttribute_1TestServlet extends ServletTest {
  
  /**
   *	We'll try to get the associated value for
   *	a non existent attribute name. We should
   *	get null as the result
   */
  
  	public String getTitle() {
  
  		return "GetAttribute_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetAttribute_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to return the Attribute properly";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//we have only mankind
  
  		Object attr = context.getAttribute("Womankind");
  
  		if(attr==null) {
  
  			msg="OK";
  			status="true";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetContextTestServlet.java
  
  Index: GetContextTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetContextTestServlet.java,v 1.1 1999/11/09 01:30:54 vanitha Exp $
   * $Date: 1999/11/09 01:30:54 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getServletContext(String) method
   */
  
  
  
  public class GetContextTestServlet extends ServletTest {
  
  /**
   *	We'll try to get the ServletContext for this
   *	servlet itself
   */
  
  	public String getTitle() {
  
  		return "GetContextTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetContextTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting ServletContext";
  		String status = "false";
  
  		String anotherServlet="/servlet/tests.javax_servlet.ServletContext.GetServletContextTestServlet";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//we expect a not null value
  
  		if(context.getContext(anotherServlet)!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetContext_1TestServlet.java
  
  Index: GetContext_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetContext_1TestServlet.java,v 1.1 1999/11/09 01:30:56 vanitha Exp $
   * $Date: 1999/11/09 01:30:56 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getContext(String) method
   */
  
  
  public class GetContext_1TestServlet extends ServletTest {
  
  /**
   *	getContext(String anotherServletPath) give the context
   *	object for anotherServlet @ anotherServletPath
   */
  
  	public String getTitle() {
  
  		return "GetContext_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetContext_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  	/**
  	 *	We set an improper Servlet Path.
  	 *	We should get null
  	 */
  
  		Properties props = new Properties();
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting ServletContext";
  		String status = "false";
  
  		String anotherServlet="tests.javax_servlet.ServletContext.GetServletContextTestServlet";
  
  		ServletConfig config = this.getServletConfig();
  
  
  		try {
  
  			ServletContext context = config.getServletContext();
  			ServletContext anotherContext=context.getContext(anotherServlet);
  		}catch(IllegalArgumentException iae) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetInitParameterNamesTestServlet.java
  
  Index: GetInitParameterNamesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetInitParameterNamesTestServlet.java,v 1.1 1999/11/09 01:30:58 vanitha Exp $
   * $Date: 1999/11/09 01:30:58 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getInitParameterNames method
   */
  
  
  public class GetInitParameterNamesTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetInitParameterNamesTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetInitParameterNamesTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting Init Param Names";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//We attributed VI to EDITOR and OS to ULTASPARC
  
  		 Enumeration names=context.getInitParameterNames();
  
  		 int count=0;
  
  		 // getting the count of the no of elements we got
  
  		 while(names.hasMoreElements()) {
  
  			count++;
  			names.nextElement();
  		 }
  
  		 //count should be 2
  
  		 if(count==2) {
  
  			names=context.getInitParameterNames();
  
  			while(names.hasMoreElements()) {
  
  				String name=(String)names.nextElement();
  
  				if(name.equals("EDITOR") ||
  					name.equals("OS")) {
  
  					msg="OK";
  					status="true";
  					count++;
  				}
  				else {
  					msg = "Problem getting Init Param Names";
  					status = "false";
  				}
  			}
  
  			if(count!=4) {
  
  				msg = "Problem getting Init Param Names";
  				status = "false";
  			}
  		 }
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetInitParameterTestServlet.java
  
  Index: GetInitParameterTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetInitParameterTestServlet.java,v 1.1 1999/11/09 01:31:00 vanitha Exp $
   * $Date: 1999/11/09 01:31:00 $
   *
   * 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.ServletContext;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getInitParameter(String) method
   */
  
  
  public class GetInitParameterTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetInitParameterTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetInitParameterTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting init params";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//We attributed VI to EDITOR
  
  		String value=context.getInitParameter("EDITOR");
  
  		if(value!=null)  {
  
  			if(value.equals("VI")) {
  
  				msg="OK";
  				status="true";
  			}
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetInitParameter_1TestServlet.java
  
  Index: GetInitParameter_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetInitParameter_1TestServlet.java,v 1.1 1999/11/09 01:31:02 vanitha Exp $
   * $Date: 1999/11/09 01:31:02 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getInitParameter(String) method
   */
  
  
  public class GetInitParameter_1TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetInitParameter_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetInitParameter_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting init params:Expected value is null";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//We did not nothing to anything
  
  		String value=context.getInitParameter("nothing");
  
  		if(value==null)  {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetMajorVersionTestServlet.java
  
  Index: GetMajorVersionTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetMajorVersionTestServlet.java,v 1.1 1999/11/09 01:31:06 vanitha Exp $
   * $Date: 1999/11/09 01:31:06 $
   *
   * 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.ServletContext;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getMajorVersion method
   */
  
  
  public class GetMajorVersionTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetMajorVersionTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMajorVersionTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Wrong Major Version";
  		String status = "false";
  
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		//should be 2 right
  
  		if(context.getMajorVersion()==2) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetMimeTypeTestServlet.java
  
  Index: GetMimeTypeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetMimeTypeTestServlet.java,v 1.1 1999/11/09 01:31:11 vanitha Exp $
   * $Date: 1999/11/09 01:31:11 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class GetMimeTypeTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetMimeTypeTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMimeTypeTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting proper MimeType";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		String mimeType = context.getMimeType("testlist.txt");
  
  		if(mimeType!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetMimeType_1TestServlet.java
  
  Index: GetMimeType_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetMimeType_1TestServlet.java,v 1.1 1999/11/09 01:31:18 vanitha Exp $
   * $Date: 1999/11/09 01:31:18 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getMimeType(String) method
   */
  
  
  public class GetMimeType_1TestServlet extends ServletTest {
  
  /**
   *	We set improper mime type
   *	We shou;ld get null as the result
   */
  
  	public String getTitle() {
  
  		return "GetMimeType_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMimeType_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting proper MimeType";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//abraca.dabra? i hope there is no such mime type so far
  
  		String mimeType = context.getMimeType("abraca.dabra");
  
  		if(mimeType==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetMinorVersionTestServlet.java
  
  Index: GetMinorVersionTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetMinorVersionTestServlet.java,v 1.1 1999/11/09 01:31:21 vanitha Exp $
   * $Date: 1999/11/09 01:31:21 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getMinorVersion method
   */
  
  
  public class GetMinorVersionTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetMinorVersionTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMinorVersionTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Wrong Minor Version";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		//should be 2
  
  		if(context.getMinorVersion()==2) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetNamedDispatcherTestServlet.java
  
  Index: GetNamedDispatcherTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetNamedDispatcherTestServlet.java,v 1.1 1999/11/09 01:31:25 vanitha Exp $
   * $Date: 1999/11/09 01:31:25 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getNamedDispatcher(String) method
   */
  
  public class GetNamedDispatcherTestServlet extends ServletTest {
  
  /**
   *	We will try to get the RequestDispatcher for the servlet
   *	Registered as config
   */
  
  	public String getTitle() {
  
  		return "GetNamedDispatcherTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetNamedDispatcherTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting Request Dipatcher";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  
  		String path="GetNamedDispatcherTest";
  		RequestDispatcher rd = context.getNamedDispatcher(path);
  
  		String name=config.getServletName();
  
  		if(rd!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetNamedDispatcher_1TestServlet.java
  
  Index: GetNamedDispatcher_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetNamedDispatcher_1TestServlet.java,v 1.1 1999/11/09 01:31:27 vanitha Exp $
   * $Date: 1999/11/09 01:31: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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Negative Test for getNamedDispatcher(String) method
   */
  
  public class GetNamedDispatcher_1TestServlet extends ServletTest {
  
  /**
   *	An invalid Servlet Name is passed to the method
   *	Expected return value is null
   */
  
  	public String getTitle() {
  
  		return "GetNamedDispatcher_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetNamedDispatcher_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem with getNamedDipatcher:Expected Value isnull";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  
  		String path="muddy";
  		RequestDispatcher rd = context.getNamedDispatcher(path);
  
  		String name=config.getServletName();
  
  		if(rd==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRealPathTestServlet.java
  
  Index: GetRealPathTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRealPathTestServlet.java,v 1.1 1999/11/09 01:31:28 vanitha Exp $
   * $Date: 1999/11/09 01:31:28 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getRealPath(String) method
   */
  
  
  public class GetRealPathTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetRealPathTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRealPathTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting Real Path";
  		String status = "false";
  
  		// getRealPath for this servlet itself
  
  		String path="/servlet/tests.javax_servlet.ServletContext.getRealPathTestServlet";
  
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		//should get a not null value
  
  		String realPath = context.getRealPath(path);
  
  		if(path!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRealPath_1TestServlet.java
  
  Index: GetRealPath_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRealPath_1TestServlet.java,v 1.1 1999/11/09 01:31:29 vanitha Exp $
   * $Date: 1999/11/09 01:31:29 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test excluded
   *	actually not needed
   */
  
  
  public class GetRealPath_1TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetRealPath_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRealPath_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid Real Path";
  		String status = "false";
  
  		String path="/dupe";
  
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		String realPath = context.getRealPath(path);
  		System.out.println("Real Path:"+realPath);
  
  		if(path==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRequestDispatcherTestServlet.java
  
  Index: GetRequestDispatcherTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRequestDispatcherTestServlet.java,v 1.1 1999/11/09 01:31:30 vanitha Exp $
   * $Date: 1999/11/09 01:31:30 $
   *
   * 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.ServletContext;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	Test for getRequestDispatcher(String) method
   */
  
  public class GetRequestDispatcherTestServlet extends ServletTest {
  
  /**
   *	We will try to get the RequestDispatcher for this servlet
   *	itself
   */
  
  	public String getTitle() {
  
  		return "GetRequestDispatcherTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRequestDispatcherTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting Request Dipatcher";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		//path for this servlet
  		//ofcourse there are more cleaner ways to get it
  		//dynamicaly
  
  		String path="/servlet/tests.javax_servlet.ServletContext.GetRequestDispatcher";
  		RequestDispatcher rd = context.getRequestDispatcher(path);
  
  		if(rd!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRequestDispatcher_1TestServlet.java
  
  Index: GetRequestDispatcher_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRequestDispatcher_1TestServlet.java,v 1.1 1999/11/09 01:31:31 vanitha Exp $
   * $Date: 1999/11/09 01:31:31 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import javax.servlet.RequestDispatcher;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Excluded Test
   */
  
  
  public class GetRequestDispatcher_1TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetRequestDispatcher_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRequestDispatcher_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg="Invalid RequestDipatcher:Expected value null";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		//can be "/fake"
  
  		String path="fake";
  
  		try {
  
  			RequestDispatcher rd=context.getRequestDispatcher(path);
  
  		}catch(IllegalArgumentException iae) {
  
  			msg="OK";
  			status="true";
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetResourceAsStreamTestServlet.java
  
  Index: GetResourceAsStreamTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetResourceAsStreamTestServlet.java,v 1.1 1999/11/09 01:31:32 vanitha Exp $
   * $Date: 1999/11/09 01:31:32 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.InputStream;
  
  /**
   *	A Test for getResourceAs Stream method
   */
  
  
  public class GetResourceAsStreamTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetResourceAsStreamTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetResourceAsStreamTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting Resource";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		// get this servlet itself
  
  		String path="/servlet/tests.javax_servlet.ServletContext.GetResourceTestServlet";
  
  		InputStream in = context.getResourceAsStream(path);
  
  		if(in==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetResourceAsStream_1TestServlet.java
  
  Index: GetResourceAsStream_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetResourceAsStream_1TestServlet.java,v 1.1 1999/11/09 01:31:33 vanitha Exp $
   * $Date: 1999/11/09 01:31:33 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.InputStream;
  
  /**
   *	A Negative Test for getResourceAsStream(String)
   */
  
  
  public class GetResourceAsStream_1TestServlet extends ServletTest {
  
  /**
   *	We will supply a non existent URL
   *	we should get null
   */
  
  	public String getTitle() {
  
  		return "GetResourceAsStream_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetResourceAsStream_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid Resource:Expected Null";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		//dummy URL
  
  		String path="/dummy";
  
  		InputStream in = context.getResourceAsStream(path);
  
  		if(in==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetResourceTestServlet.java
  
  Index: GetResourceTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetResourceTestServlet.java,v 1.1 1999/11/09 01:31:35 vanitha Exp $
   * $Date: 1999/11/09 01:31:35 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.net.URL;
  
  /**
   *	A Test for getResource(String) method
   */
  
  
  public class GetResourceTestServlet extends ServletTest {
  
  /**
   *	We will this servlet itself
   *	as a resource
   */
  
  	public String getTitle() {
  
  		return "GetResourceTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetResourceTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting Resource";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		String path="/servlet/tests.javax_servlet.ServletContext.GetResourceTestServlet";
  
  		URL resourceURL = context.getResource(path);
  
  		if(resourceURL!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetResource_1TestServlet.java
  
  Index: GetResource_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetResource_1TestServlet.java,v 1.1 1999/11/09 01:31:37 vanitha Exp $
   * $Date: 1999/11/09 01:31:37 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.net.URL;
  
  /**
   *	A Negative Test for getResourse(String) method
   */
  
  public class GetResource_1TestServlet extends ServletTest {
  
  /**
   *	We will give a fake URL
   *	we should null
   */
  
  	public String getTitle() {
  
  		return "GetResource_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetResource_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting Resource";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		String path="/dupe";
  
  		URL resourceURL = context.getResource(path);
  
  		if(resourceURL==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetServerInfoTestServlet.java
  
  Index: GetServerInfoTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetServerInfoTestServlet.java,v 1.1 1999/11/09 01:31:42 vanitha Exp $
   * $Date: 1999/11/09 01:31:42 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test For getServerInfo mehotd
   */
  
  
  public class GetServerInfoTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetServerInfoTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServerInfoTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting ServerInfo";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		String info = context.getServerInfo();
  
  		// it just needs to be a not null value
  
  		if(info!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetServletNamesTestServlet.java
  
  Index: GetServletNamesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetServletNamesTestServlet.java,v 1.1 1999/11/09 01:31:43 vanitha Exp $
   * $Date: 1999/11/09 01:31:43 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Enumeration;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Test for getServletNames method
   */
  
  
  public class GetServletNamesTestServlet extends ServletTest {
  
  /**
   *	Deprecated method: it is required to
   *	return null
   */
  
  	public String getTitle() {
  
  		return "GetServletNamesTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletNamesTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting servletNames";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		// we should get an empty enum object
  
  		Enumeration enum = context.getServletNames();
  
  		if(!enum.hasMoreElements()) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetServletTestServlet.java
  
  Index: GetServletTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetServletTestServlet.java,v 1.1 1999/11/09 01:31:45 vanitha Exp $
   * $Date: 1999/11/09 01:31:45 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import javax.servlet.Servlet;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getServlet(String) method
   */
  
  public class GetServletTestServlet extends ServletTest {
  
  /**
   *	Deprecated method:should return null
   */
  
  	public String getTitle() {
  
  		return "GetServletTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting servlet";
  		String status = "false";
  
  		String path="/servlet/tests.javax_servlet.ServletContext.GetServletTestServlet";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		Servlet servlet = context.getServlet(path);
  
  		if(servlet==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetServletsTestServlet.java
  
  Index: GetServletsTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetServletsTestServlet.java,v 1.1 1999/11/09 01:31:46 vanitha Exp $
   * $Date: 1999/11/09 01:31:46 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getServlets
   */
  
  
  public class GetServletsTestServlet extends ServletTest {
  
  /**
   *	Deprecated method:required to return an empty Enumeration
   */
  
  	public String getTitle() {
  
  		return "GetServletsTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletsTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem gettin servlets";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//should get ana empty enumeration
  
  		Enumeration enum = context.getServlets();
  
  		if(!enum.hasMoreElements()) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/Log_1TestServlet.java
  
  Index: Log_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/Log_1TestServlet.java,v 1.1 1999/11/09 01:31:47 vanitha Exp $
   * $Date: 1999/11/09 01:31:47 $
   *
   * 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.ServletContext;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *  	Test for log(String message)
   */
  
  
  
  /**
   *	we are just passing it
   *	The server specific log file can be
   *	looked up  to see an outting
   */
  
  public class Log_1TestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "Log_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "Log_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		context.log("testing");
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/Log_2TestServlet.java
  
  Index: Log_2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/Log_2TestServlet.java,v 1.1 1999/11/09 01:31:48 vanitha Exp $
   * $Date: 1999/11/09 01:31:48 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *  	Test for log(String message,Throwable)
   */
  
  /**
   *	we are just passing it
   *	The server specific log file can be
   *	looked up  to see an outting
   */
  
  public class Log_2TestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "Log_2TestServlet";
  	}
  
  	public String getDescription() {
  		return "Log_2TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status ="true";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		context.log("testing");
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/Log_3TestServlet.java
  
  Index: Log_3TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/Log_3TestServlet.java,v 1.1 1999/11/09 01:31:49 vanitha Exp $
   * $Date: 1999/11/09 01:31:49 $
   *
   * 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.ServletContext;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  	Test for log(Exception e,String message)
   */
  
  
  
  /** we are just passing it
   *  The server specific log file can be
   *   looked up  to see an outting
   */
  
  public class Log_3TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "Log_3TestServlet";
  	}
  
  	public String getDescription() {
  		return "Log_3TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  
  		ServletConfig config = this.getServletConfig();
  		ServletContext context = config.getServletContext();
  
  		Exception e = new Exception("Exceptional");
  		context.log(e,"pass");
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/RemoveAttributeTestServlet.java
  
  Index: RemoveAttributeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/RemoveAttributeTestServlet.java,v 1.1 1999/11/09 01:31:49 vanitha Exp $
   * $Date: 1999/11/09 01:31:49 $
   *
   * 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.ServletContext;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	Test for RemoveAttribute(String) method
   *	@author Nikesh Anand
   */
  
  
  public class RemoveAttributeTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "RemoveAttributeTestServlet";
  	}
  
  	public String getDescription() {
  		return "RemoveAttributeTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem removing value";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//first set attribute
  		context.setAttribute("Mankind","humane");
  
  		//try removing it
  		context.removeAttribute("Mankind");
  
  
  		//try getting it,should get null
  
  		if(context.getAttribute("Mankind")==null) {
  
  				msg="OK";
  				status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/SetAttributeTestServlet.java
  
  Index: SetAttributeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/SetAttributeTestServlet.java,v 1.1 1999/11/09 01:31:51 vanitha Exp $
   * $Date: 1999/11/09 01:31:51 $
   *
   * 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.ServletContext;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for setAttribute(String,Object) method
   */
  
  
  public class SetAttributeTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SetAttributeTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetAttributeTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to return the Attribute properly";
  		String status = "false";
  
  		ServletConfig config = this.getServletConfig();
  
  		ServletContext context = config.getServletContext();
  
  		//set and get
  
  		context.setAttribute("Mankind","humane");
  
  		Object attr = context.getAttribute("Mankind");
  
  		if(attr!=null) {
  
  			if(attr.getClass().getName().equals("java.lang.String")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/Constructor1TestServlet.java
  
  Index: Constructor1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/Constructor1TestServlet.java,v 1.1 1999/11/09 01:32:08 vanitha Exp $
   * $Date: 1999/11/09 01:32:08 $
   *
   * 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.ServletException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for ServletException() constructor method
   */
  
  
  public class Constructor1TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "Constructor1TestServlet";
  	}
  
  	public String getDescription() {
  
  		return "Constructor1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem with ServletException";
  		String status = "false";
  
  		 // construct and throw
  
  		 try {
  
  		 	throw new ServletException();
  
  		 }catch(Exception e) { // ctaching it here itself
  
  			if(e instanceof ServletException) {
  
  				msg="OK";
  				status="true";
  			}
  		 }
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/Constructor2TestServlet.java
  
  Index: Constructor2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/Constructor2TestServlet.java,v 1.1 1999/11/09 01:32:11 vanitha Exp $
   * $Date: 1999/11/09 01:32:11 $
   *
   * 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.ServletException;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for ServletException(String) constructor method
   */
  
  
  public class Constructor2TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "Constructor2TestServlet";
  	}
  
  	public String getDescription() {
  		return "Constructor2TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem with ServletException(java.lang.String";
  		String status = "false";
  
  		try {
  
  			throw new ServletException("Exceptional");
  
  		}catch(Exception e) {
  
  			if(e instanceof ServletException) {
  
  				if(e.getMessage().equals("Exceptional")){
  					msg="OK";
  					status="true";
  				}
  
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/Constructor3TestServlet.java
  
  Index: Constructor3TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/Constructor3TestServlet.java,v 1.1 1999/11/09 01:32:12 vanitha Exp $
   * $Date: 1999/11/09 01:32:12 $
   *
   * 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.ServletException;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for ServletException(Throwable) constructor method
   */
  
  
  public class Constructor3TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "Constructor3TestServlet";
  	}
  
  	public String getDescription() {
  		return "Constructor3TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem with ServletException(Throwable)";
  		String status = "false";
  
  		ServletException se=null;
  
  
  		//construct one and throw
  
  		try {
  			se = new ServletException(new Throwable("irrelevant"));
  
  			throw se;
  
  		}catch(Exception e) {
  
  			if(e instanceof ServletException) {
  
  				Throwable rootCause = se.getRootCause();
  
  				if(rootCause!=null) {
  
  					if(rootCause.getMessage().equals("irrelevant")) {
  
  						msg="OK";
  						status="true";
  					}
  
  				}
  
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/Constructor4TestServlet.java
  
  Index: Constructor4TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/Constructor4TestServlet.java,v 1.1 1999/11/09 01:32:14 vanitha Exp $
   * $Date: 1999/11/09 01:32:14 $
   *
   * 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.ServletException;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for ServletException(String,Throwable) constructor method
   */
  
  public class Constructor4TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "Constructor4TestServlet";
  	}
  
  	public String getDescription() {
  		return "Constructor4TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem with ServletException(java.lang.String,Throwable)";
  		String status = "false";
  
  		ServletException se=null;
  
  		//construct and throw
  
  		try {
  
  			se = new ServletException("Exceptional",new Throwable("cos"));
  
  
  			throw se;
  
  		}
  		catch(Exception e) {
  
  			if(se instanceof ServletException ) {
  
  
  				Throwable cause = se.getRootCause();
  
  				String mesg = se.getMessage();
  
  				if(cause !=null && mesg !=null) {
  
  					if(mesg.equals("Exceptional") &&
  
  						cause.getMessage().equals("cos")) {
  
  						msg="OK";
  						status="true";
  
  					}
  
  				}
  
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/GetRootCauseTestServlet.java
  
  Index: GetRootCauseTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/GetRootCauseTestServlet.java,v 1.1 1999/11/09 01:32:15 vanitha Exp $
   * $Date: 1999/11/09 01:32:15 $
   *
   * 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.ServletException;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getRootCause method
   */
  
  
  public class GetRootCauseTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetRootCauseTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRootCauseTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem with getRootCause returned invalis value";
  		String status = "false";
  
  		ServletException se = new ServletException(new Throwable("cause"));
  
  		if(se.getRootCause() instanceof Throwable) {
  
  			msg="OK";
  			status="true";
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/GetRootCause_1TestServlet.java
  
  Index: GetRootCause_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletException/GetRootCause_1TestServlet.java,v 1.1 1999/11/09 01:32:15 vanitha Exp $
   * $Date: 1999/11/09 01:32:15 $
   *
   * 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.ServletException;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getRootCause method
   */
  
  
  public class GetRootCause_1TestServlet extends ServletTest {
  
  /**
   *	we will construct a ServletException without a
   *	Throwable object as a param.
   *	getRootCause on that object should return null
   */
  
  	public String getTitle() {
  
  		return "GetRootCause_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRootCause_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Returned Invalid Value:null expected";
  		String status = "false";
  
  		ServletException se = new ServletException();
  
  		if(se.getRootCause() == null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletInputStream/ReadLineTestServlet.java
  
  Index: ReadLineTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletInputStream/ReadLineTestServlet.java,v 1.1 1999/11/09 01:32:27 vanitha Exp $
   * $Date: 1999/11/09 01:32: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.ServletInputStream;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletInputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.BufferedReader;
  
  /**
   *	A Test for readLine method
   */
  
  
  public class ReadLineTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "ReadLineTestServlet";
  	}
  
  	public String getDescription() {
  		return "ReadLineTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting message using ReadLine";
  		String status = "false";
  
  		ServletInputStream sins = request.getInputStream();
  
  //		BufferedReader br = request.getReader();
  
  //		int avail = sins.available();
  		//int avail = br.available();
  
  		byte buffer[] = new byte[request.getContentLength()];
  
  		//System.out.println("Avail:"+avail);
  
  		int len = sins.readLine(buffer,0,buffer.length);
  
  		//our client sent ULTRA SPARC  in the stream
  
  		String buff = new String(buffer,0,len);
  
  
  		if(buff.trim().equals("ULTRA SPARC")) {
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print1TestServlet.java
  
  Index: Print1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print1TestServlet.java,v 1.1 1999/11/09 01:32:34 vanitha Exp $
   * $Date: 1999/11/09 01:32:34 $
   *
   * 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.ServletOutputStream;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /*print(java.langString)*/
  
  public class Print1TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Print1TestServlet";
  	}
  
  	public String getDescription() {
  		return "Print1TestServlet";
  	}
  
  
  	//dummy
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  			sos=response.getOutputStream();
  
  			//We should get HiThere in the client side
  			//We are gving two print stmts only
  			//to differentiate print and println
  
  			sos.print("Hi");
  			sos.println("There");
  
  			props.put(Constants.Response.Status, "true");
  			props.put(Constants.Response.Message, "");
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  		props.save(sos, this.getClass().getName());
  
  	}	
  
  
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print2TestServlet.java
  
  Index: Print2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print2TestServlet.java,v 1.1 1999/11/09 01:32:34 vanitha Exp $
   * $Date: 1999/11/09 01:32:34 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* print(boolean) */
  
  public class Print2TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Print2TestServlet";
  	}
  
  	public String getDescription() {
  		return "Print2TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null ;
  
  		return props;
  	}
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  			sos=response.getOutputStream();
  
  			//We are gving two print stmts only
  			//to differentiate print and println
  
  			sos.print(true);
  			sos.println(true);
  
  			props.put(Constants.Response.Status, "true");
  			props.put(Constants.Response.Message, "");
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  		props.save(sos, this.getClass().getName());
  
  	}	
  
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print3TestServlet.java
  
  Index: Print3TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print3TestServlet.java,v 1.1 1999/11/09 01:32:34 vanitha Exp $
   * $Date: 1999/11/09 01:32:34 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* print(char) */
  
  public class Print3TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Print3TestServlet";
  	}
  
  	public String getDescription() {
  		return "Print3TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  		return props;
  	}
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  			sos=response.getOutputStream();
  
  			//We are gving two print stmts only
  			//to differentiate print and println
  
  			sos.print('V');
  			sos.println('W');
  
  			props.put(Constants.Response.Status, "true");
  			props.put(Constants.Response.Message, "");
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  		props.save(sos, this.getClass().getName());
  
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print4TestServlet.java
  
  Index: Print4TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print4TestServlet.java,v 1.1 1999/11/09 01:32:35 vanitha Exp $
   * $Date: 1999/11/09 01:32:35 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* print(int) */
  
  public class Print4TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Print4TestServlet";
  	}
  
  	public String getDescription() {
  		return "Print4TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  		return props;
  	}
  
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  			sos=response.getOutputStream();
  
  			//We are gving two print stmts only
  			//to differentiate print and println
  
  			sos.print(1);
  			sos.println(2);
  
  			props.put(Constants.Response.Status, "true");
  			props.put(Constants.Response.Message, "");
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  		props.save(sos, this.getClass().getName());
  
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print5TestServlet.java
  
  Index: Print5TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print5TestServlet.java,v 1.1 1999/11/09 01:32:35 vanitha Exp $
   * $Date: 1999/11/09 01:32:35 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* print(long) */
  
  public class Print5TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Print5TestServlet";
  	}
  
  	public String getDescription() {
  		return "Print5TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  			sos=response.getOutputStream();
  
  			//We are gving two print stmts only
  			//to differentiate print and println
  
  			long ago=1234567890;
  
  			sos.print(ago);
  			sos.println(ago);
  
  			props.put(Constants.Response.Status, "true");
  			props.put(Constants.Response.Message, "");
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  		props.save(sos, this.getClass().getName());
  
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print6TestServlet.java
  
  Index: Print6TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print6TestServlet.java,v 1.1 1999/11/09 01:32:38 vanitha Exp $
   * $Date: 1999/11/09 01:32:38 $
   *
   * 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.ServletOutputStream;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* print(float) */
  
  public class Print6TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Print6TestServlet";
  	}
  
  	public String getDescription() {
  		return "Print6TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  			sos=response.getOutputStream();
  
  			//We should get HiThere in the client side
  			//We are gving two print stmts only
  			//to differentiate print and println
  
  			float val1=1234.5f;
  			float val2=6789.1f;
  
  			sos.print(val1);
  			sos.println(val2);
  
  			props.put(Constants.Response.Status, "true");
  			props.put(Constants.Response.Message, "");
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  		props.save(sos, this.getClass().getName());
  
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print7TestServlet.java
  
  Index: Print7TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Print7TestServlet.java,v 1.1 1999/11/09 01:32:39 vanitha Exp $
   * $Date: 1999/11/09 01:32:39 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* print(double) */
  
  public class Print7TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Print7TestServlet";
  	}
  
  	public String getDescription() {
  		return "Print7TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  			sos=response.getOutputStream();
  
  			//We are gving two print stmts only
  			//to differentiate print and println
  
  			double bull=12345.6;
  			double bull1=6789.1;
  
  			sos.print(bull);
  			sos.println(bull1);
  
  			props.put(Constants.Response.Status, "true");
  			props.put(Constants.Response.Message, "");
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  		props.save(sos, this.getClass().getName());
  
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println1TestServlet.java
  
  Index: Println1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println1TestServlet.java,v 1.1 1999/11/09 01:32:40 vanitha Exp $
   * $Date: 1999/11/09 01:32:40 $
   *
   * 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.ServletOutputStream;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* println() */
  
  public class Println1TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Println1TestServlet";
  	}
  
  	public String getDescription() {
  		return "Println1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response)  {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			try {
  				sos=response.getOutputStream();
  
  				sos.println();
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  			}
  		}catch(Exception e) {}
  
  	}
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println2TestServlet.java
  
  Index: Println2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println2TestServlet.java,v 1.1 1999/11/09 01:32:41 vanitha Exp $
   * $Date: 1999/11/09 01:32:41 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* println(java.lang.String) */
  
  public class Println2TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Println2TestServlet";
  	}
  
  	public String getDescription() {
  		return "Println2TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null; 
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response)  {
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			try {
  				sos=response.getOutputStream();
  
  				sos.println("To the Moon and Back");
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  			}
  		}catch(Exception e) {}
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println3TestServlet.java
  
  Index: Println3TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println3TestServlet.java,v 1.1 1999/11/09 01:32:42 vanitha Exp $
   * $Date: 1999/11/09 01:32:42 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* println(boolean) */
  public class Println3TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Println3TestServlet";
  	}
  
  	public String getDescription() {
  		return "Println3TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response)  {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			try {
  				sos=response.getOutputStream();
  
  				sos.println(true);
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  			}
  		}catch(Exception e) {}
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println4TestServlet.java
  
  Index: Println4TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println4TestServlet.java,v 1.1 1999/11/09 01:32:43 vanitha Exp $
   * $Date: 1999/11/09 01:32:43 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* println(char) */
  
  public class Println4TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Println4TestServlet";
  	}
  
  	public String getDescription() {
  		return "Println4TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props =null;
  
  		return props;
  	}
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response)  {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			try {
  				sos=response.getOutputStream();
  
  				sos.println('V');
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  			}
  		}catch(Exception e) {}
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println5TestServlet.java
  
  Index: Println5TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println5TestServlet.java,v 1.1 1999/11/09 01:32:45 vanitha Exp $
   * $Date: 1999/11/09 01:32:45 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* println(int) */
  
  public class Println5TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Println5TestServlet";
  	}
  
  	public String getDescription() {
  		return "Println5TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response)  {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			try {
  				sos=response.getOutputStream();
  
  				sos.println(1);
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  			}
  		}catch(Exception e) {}
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println6TestServlet.java
  
  Index: Println6TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println6TestServlet.java,v 1.1 1999/11/09 01:32:45 vanitha Exp $
   * $Date: 1999/11/09 01:32:45 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /*println(long) */
  
  public class Println6TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Println6TestServlet";
  	}
  
  	public String getDescription() {
  		return "Println6TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response)  {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			try {
  				sos=response.getOutputStream();
  
  				long ago=1234567890;
  
  				sos.println(ago);
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  			}
  		}catch(Exception e) {}
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println7TestServlet.java
  
  Index: Println7TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println7TestServlet.java,v 1.1 1999/11/09 01:32:46 vanitha Exp $
   * $Date: 1999/11/09 01:32:46 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /* println(float) */
  
  public class Println7TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Println7TestServlet";
  	}
  
  	public String getDescription() {
  		return "Println7TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		return props;
  	}
  
  
  	public void service(HttpServletRequest request, HttpServletResponse response)  {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			try {
  				sos=response.getOutputStream();
  
  				float val=12345.6f;
  
  				sos.println(val);
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  			}
  		}catch(Exception e) {}
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println8TestServlet.java
  
  Index: Println8TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletOutputStream/Println8TestServlet.java,v 1.1 1999/11/09 01:32:46 vanitha Exp $
   * $Date: 1999/11/09 01:32:46 $
   *
   * 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.ServletOutputStream;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /*println(double)*/
  
  public class Println8TestServlet extends ServletTest { 
  
  	public String getTitle() { 
  
  		return "Println8TestServlet";
  	}
  
  	public String getDescription() {
  		return "Println8TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response)  {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			try {
  				sos=response.getOutputStream();
  
  				double bull = 1234567.8;
  				sos.println(bull);
  
  			}catch (IOException ioe) {
  
  				response.sendError(500);
  
  			} catch (RuntimeException e) { //servlet crash?
  
  			}catch(Exception e) {
  
  				//Unknow Exception
  				response.sendError(500);
  			}
  		}catch(Exception e) {}
  
  	}
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetAttributeNamesTestServlet.java
  
  Index: GetAttributeNamesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetAttributeNamesTestServlet.java,v 1.1 1999/11/09 01:32:52 vanitha Exp $
   * $Date: 1999/11/09 01:32:52 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**	A Test For getAttribute()
   *
   */
  
  
  public class GetAttributeNamesTestServlet extends GenericServletTest {
  
  /**
   *	getAttributeNames returns an enumeration of
   * 	set attribute names.
   */
  
  	public String getTitle() {
  
  		return "GetAttributeNamesTestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetAttributeNamesTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting AttributeNames";
  		String status = "true";// something wrong
  
  		//associating attrs to names
  
  		request.setAttribute("Man","Patience");
  		request.setAttribute("Woman","Feelings");
  
  
  		Enumeration enum = request.getAttributeNames();
  
  		int count=0;
  
  		// checking the count
  
  		while(enum.hasMoreElements()) {
  
  			enum.nextElement();
  			count++;
  		}
  
  		// is it = 2
  
  		if(count==2) {
  
  			enum = request.getAttributeNames();
  
  			// checking name:value association
  
  			while(enum.hasMoreElements()) {
  
  				String name=(String)enum.nextElement();
  
  				if(name.equals("Man") || name.equals("Woman")) {
  
  					msg="OK";
  					status="true";
  				}
  				else {
  
  					//only one attr is correct
  
  					msg="Problem getting Attr Names";
  					status="false";
  				}
  
  			}
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetAttributeTestServlet.java
  
  Index: GetAttributeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetAttributeTestServlet.java,v 1.1 1999/11/09 01:32:53 vanitha Exp $
   * $Date: 1999/11/09 01:32:53 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class GetAttributeTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetAttributeTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetAttributeTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting Attibute";
  		String status = "false";
  
  		request.setAttribute("Man","Patience");
  
  		String attr = (String)request.getAttribute("Man");
  
  		if(attr!=null) {
  
  			if(attr.equals("Patience")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetAttribute_1TestServlet.java
  
  Index: GetAttribute_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetAttribute_1TestServlet.java,v 1.1 1999/11/09 01:32:53 vanitha Exp $
   * $Date: 1999/11/09 01:32:53 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**	A Negative Test For getAttribute(String)
   *
   */
  
  
  public class GetAttribute_1TestServlet extends GenericServletTest {
  
  /**	getAttribute(String name) gives the value
   *	associated with name as an Object
   */
  
  	public String getTitle() {
  
  		return "GetAttribute_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetAttribute_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting Attibute:Expected null";
  		String status = "false"; // if any problem
  
  
  		// getting request attribute
  		// actually nothing was set
  
  		String attr = (String)request.getAttribute("Man");
  
  		// attr should be null
  
  		if(attr==null) {
  
  			// yes it is null
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetCharacterEncodingTestServlet.java
  
  Index: GetCharacterEncodingTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetCharacterEncodingTestServlet.java,v 1.1 1999/11/09 01:32:53 vanitha Exp $
   * $Date: 1999/11/09 01:32:53 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**	A Test For getCharacterEncoding()
   *
   */
  
  
  public class GetCharacterEncodingTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetCharacterEncodingTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetCharacterEncodingTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "";
  		String status = "false";
  
  		// getting char encoding
  
  		String encoding = request.getCharacterEncoding();
  
  		// in client side we set it to IS0-8859-1
  
  		if(encoding!=null) {
  
  			if(encoding.indexOf("ISO")>-1) {
  
  				msg="OK";
  				status="true";
  
  			}// else wrong type of encoding
  
  		}//else we should have got some encoding
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetCharacterEncoding_1TestServlet.java
  
  Index: GetCharacterEncoding_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetCharacterEncoding_1TestServlet.java,v 1.1 1999/11/09 01:32:54 vanitha Exp $
   * $Date: 1999/11/09 01:32:54 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**	A negative Test For getCharacterEncoding()
   *
   */
  
  
  public class GetCharacterEncoding_1TestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetCharacterEncoding_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetCharacterEncoding_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Null Expected but returned something else";
  		String status = "false";// wrong value was returned
  
  		// getting caharater encoding
  
  		String encoding = request.getCharacterEncoding();
  
  		// we didn't set anything in the client side
  		// should get null
  
  		if(encoding==null) {
  
  			status="true";
  			msg="OK";
  		}
  		else  // we got something else
  			msg = "Null Expected but returned " + encoding;
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentLengthTestServlet.java
  
  Index: GetContentLengthTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentLengthTestServlet.java,v 1.1 1999/11/09 01:32:54 vanitha Exp $
   * $Date: 1999/11/09 01:32:54 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletInputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Test for getContentLength
   */
  
  public class GetContentLengthTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetContentLengthTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetContentLengthTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  	/**
  	 *	We get the content length using getContentLength and
  	 * 	we read from the input stream. if the no of chars read
  	 * 	matches the no returned by getContentLength
  	 *	we pass the test
  	 */
  
  		Properties props = new Properties();
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting correct content length";
  		String status = "false";
  
  		// get the content length
  
  		int contentLength = request.getContentLength();
  
  		int len=0;
  		// getting input stream
  
  		ServletInputStream sin = request.getInputStream();
  
  		// read from the stream
  
  		while(sin.read()!=-1) {
  
  			len++;
  		}
  
  		// did we get what we wrote
  
  		if(len==contentLength) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentLength_1TestServlet.java
  
  Index: GetContentLength_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentLength_1TestServlet.java,v 1.1 1999/11/09 01:32:55 vanitha Exp $
   * $Date: 1999/11/09 01:32:55 $
   *
   * 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.ServletRequest;
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A negative Test for getContentLength
   */
  
  
  public class GetContentLength_1TestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetContentLength_1TestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetContentLength_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting ContentLength: \"-1\" expected";
  		String status = "false";
  
  
  		// client just connected.
  		// so should get -1
  
  		if(request.getContentLength()!=1)  {
  
  			// we got -1
  
  			msg="OK";
  			status="true";
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentTypeTestServlet.java
  
  Index: GetContentTypeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentTypeTestServlet.java,v 1.1 1999/11/09 01:32:55 vanitha Exp $
   * $Date: 1999/11/09 01:32:55 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Servlet side Test for getContentType
   */
  
  
  public class GetContentTypeTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetContentTypeTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetContentTypeTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem Getting ContentType";
  		String status = "false";
  
  
  		// in client side it was set to "text/plain"
  
  		String contentType=request.getContentType();
  
  		if(contentType!=null) {
  
  			// equating with "text/plain"
  
  			if(contentType.equals("text/plain")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentType_1TestServlet.java
  
  Index: GetContentType_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetContentType_1TestServlet.java,v 1.1 1999/11/09 01:32:55 vanitha Exp $
   * $Date: 1999/11/09 01:32:55 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  servlet side negative Test for getContentType
   */
  
  
  public class GetContentType_1TestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetContentType_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetContentType_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		/**
  		 *	If the content length is zero,the getContentTye
  		 *	method should return null.
  		 *	The client sent no data with the request.
  		 */
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Wrong Content Type: Expected null";
  		String status = "false";
  
  		// should get null
  
  		if(request.getContentType()==null) {
  
  			// works fine
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetInputStreamTestServlet.java
  
  Index: GetInputStreamTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetInputStreamTestServlet.java,v 1.1 1999/11/09 01:32:55 vanitha Exp $
   * $Date: 1999/11/09 01:32:55 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import javax.servlet.ServletInputStream;
  import java.io.IOException;
  
  
  /**
   * 	A Test for getInputStream method
   */
  
  public class GetInputStreamTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetInputStreamTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetInputStreamTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting InputStream";
  		String status = "false";
  
  		ServletInputStream sin=request.getInputStream();
  
  		if(sin!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetInputStream_1TestServlet.java
  
  Index: GetInputStream_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetInputStream_1TestServlet.java,v 1.1 1999/11/09 01:32:56 vanitha Exp $
   * $Date: 1999/11/09 01:32:56 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import javax.servlet.ServletInputStream;
  import java.io.IOException;
  import java.io.BufferedReader;
  
  
  /**
   * 	A Negative Test for getInputStreamMethod
   */
  
  public class GetInputStream_1TestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetInputStream_1TestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetInputStream_1TestServlet";
  
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  	/** 	We'll get Reader object using ServletRequest.getReader()
  	 *	then we'll try to get the inputStream Object
  	 *	An IllegalStateException should be thrown
  	 */
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to raise IllegalStateException";
  		String status = "false";
  
  
  		// getting Reader object
  
  		BufferedReader br = request.getReader();
  
  		try {
  
  			//we already got reader object
  			// IllegalStateException should be thrown
  
  			ServletInputStream sin=request.getInputStream();
  
  		}catch(IllegalStateException iae) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  
  		return props;
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetLocaleTestServlet.java
  
  Index: GetLocaleTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetLocaleTestServlet.java,v 1.1 1999/11/09 01:32:56 vanitha Exp $
   * $Date: 1999/11/09 01:32:56 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for ServletRequest.getLocale method
   */
  
  
  public class GetLocaleTestServlet extends GenericServletTest {
  
  
  /**
   *	In the client side we set the Accept-Language header to en-gb
   *	We should get en_GB here
   */
  
  	public String getTitle() {
  
  		return "GetReaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetReaderTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting Reader";
  		String status = "false";
  
  
  		if(request.getLocale().toString().equals("en_GB")) {
  
  			status="true";
  			msg="OK";
  		}//else { got something else, could be null also }
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetLocalesTestServlet.java
  
  Index: GetLocalesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetLocalesTestServlet.java,v 1.1 1999/11/09 01:32:57 vanitha Exp $
   * $Date: 1999/11/09 01:32:57 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.util.Enumeration;
  import java.util.Locale;
  
  /**
   *	Test for ServletRequest.getLocales method
   */
  
  
  public class GetLocalesTestServlet extends GenericServletTest {
  
  
  /**
   *	We set en-gb and en-us  Accept-Language headers in the client side
   *	we should get them here
   */
  
  	public String getTitle() {
  
  		return "GetLocalesServlet";
  	}
  
  	public String getDescription() {
  		return "GetLocalesTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting Locales";
  		String status = "false";
  
  		Enumeration locales = request.getLocales();
  
  		int count=0;
  
  		while(locales.hasMoreElements()) {
  
  			count++;
  			locales.nextElement();
  		}
  
  		if(count==2) {
  
  			locales=request.getLocales();
  
  			while(locales.hasMoreElements()) {
  
  				Locale loc=(Locale)locales.nextElement();
  
  				if(loc.toString().equals("en_GB") ||
  
  					loc.toString().equals("en_US") ) {
  
  					count++;
  					msg="OK";
  					status="true";
  				}
  				else {
  
  					msg="false";
  					status="problem getting Locales";
  				}
  			}
  
  			//count should be exactly 4.
  			// if it were 3 then only one of the Locales
  			//we received was correct
  
  			if(count!=4) {
  
  				msg="false";
  				status="problem getting Locales";
  			}
  
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetLocales_1TestServlet.java
  
  Index: GetLocales_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetLocales_1TestServlet.java,v 1.1 1999/11/09 01:32:57 vanitha Exp $
   * $Date: 1999/11/09 01:32:57 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.util.Enumeration;
  import java.util.Locale;
  
  /**
   *	Negative Test for ServletRequest.getLocales method
   */
  
  
  public class GetLocales_1TestServlet extends GenericServletTest {
  
  
  /**
   *	We did not set any Accept-Language header in the client side
   *	we should get an Enumeration with one Default Locale
   */
  
  	public String getTitle() {
  
  		return "GetLocales_1Servlet";
  	}
  
  	public String getDescription() {
  		return "GetLocales_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting Locales";
  		String status = "false";
  
  		Enumeration locales = request.getLocales();
  
  		int count=0;
  
  		while(locales.hasMoreElements()) {
  
  			count++;
  			locales.nextElement();
  		}
  
  		if(count==1) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterNamesTestServlet.java
  
  Index: GetParameterNamesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterNamesTestServlet.java,v 1.1 1999/11/09 01:32:57 vanitha Exp $
   * $Date: 1999/11/09 01:32:57 $
   *
   * 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.ServletRequest;
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Test for getParameterNames Method
   */
  
  
  public class GetParameterNamesTestServlet extends GenericServletTest {
  
  
  	/**
  	 *	getParameterNames gives an Enumeration  of
  	 *	names of the request parameters
  	 */
  
  	public String getTitle() {
  
  		return "GetParameterNamesTestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetParameterNamesTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting param names";
  		String status = "false";
  
  		Enumeration enum = request.getParameterNames();
  
  		int count=0;
  
  		// Counting  no of parameters
  		// actually 2
  
  		while(enum.hasMoreElements()) {
  
  			count++;
  			enum.nextElement();
  		}
  
  
  		// if only 2
  
  		if(count==2) {
  
  			enum = request.getParameterNames();
  
  			// get the names
  
  			Object name1 = enum.nextElement();
  			Object name2 = enum.nextElement();
  
  
  			// are they instance of java.lang.String
  
  			if(name1 instanceof String
  				&& name2 instanceof String) {
  
  				// r v getting what we set
  
  				if((((String)name1).equals("org") ||
  				((String)name2).equals("org"))
  					&&
  				(((String)name1).equals("loc") ||
  				((String)name2).equals("loc"))) {
  
  					msg= "OK";
  					status="true";
  				}
  				else {
  
  					msg="Problem getting param names";
  					status="false";
  				}
  
  			}
  
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterNames_1TestServlet.java
  
  Index: GetParameterNames_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterNames_1TestServlet.java,v 1.1 1999/11/09 01:32:58 vanitha Exp $
   * $Date: 1999/11/09 01:32:58 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Neagative test for getParameterNames()
   */
  
  
  public class GetParameterNames_1TestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetParameterNames_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetParameterNames_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting param names:expected null";
  		String status = "false";
  
  		// no parameter was set in the client side
  		// should get nothing
  
  		Enumeration enum = request.getParameterNames();
  
  		// is enum  empty
  
  		if(!enum.hasMoreElements()) {
  
  			// yes it is
  
  			msg="OK";
  			status="true";
  
  		}// else no it is not
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterTestServlet.java
  
  Index: GetParameterTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterTestServlet.java,v 1.1 1999/11/09 01:32:58 vanitha Exp $
   * $Date: 1999/11/09 01:32:58 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Test for getParameter(String)
   */
  
  
  public class GetParameterTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetParameterTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetParameterTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting parameter";
  		String status = "false";
  
  		// getting the request parameter
  
  		Object param = request.getParameter("org");
  
  		// param should not be null as
  		// something was supplied by the client
  
  		if(param != null) {
  
  			// is param an instance of java.lang.String
  
  			if(param instanceof String) {
  
  				// equating with sun
  
  				if(((String)param).equals("sun")) {
  
  					msg="OK";
  					status="true";
  
  				}// else got wrong value
  
  			} // else instance of something else
  
  		}// else it is null! can't be
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterValuesTestServlet.java
  
  Index: GetParameterValuesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterValuesTestServlet.java,v 1.1 1999/11/09 01:32:58 vanitha Exp $
   * $Date: 1999/11/09 01:32:58 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getParameterValues(String)
   */
  
  
  public class GetParameterValuesTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetParameterValuesTestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetParameterValuesTestServlet";
  
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting param values";
  		String status = "false";
  
  		String[] vals = request.getParameterValues("org");
  
  		if(vals.length == 2) {
  
  			if((vals[0].equals("sun")
  				||vals[1].equals("javasoft")) &&
  
  				(vals[0].equals("sun")||
  					vals[1].equals("javasoft"))) {
  
  				msg="OK";
  				status="true";
  
  			}
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterValues_1TestServlet.java
  
  Index: GetParameterValues_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameterValues_1TestServlet.java,v 1.1 1999/11/09 01:32:59 vanitha Exp $
   * $Date: 1999/11/09 01:32:59 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Neagative test for getParameterValues(String)
   */
  
  
  public class GetParameterValues_1TestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetParameterValues_1TestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetParameterValues_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting param vals:Expected null";
  		String status = "false";
  
  		// no parameter was set with name zero
  		// so should get zero value
  
  		try {
  		String[] vals = request.getParameterValues("zero");
  
  		if(vals==null) {
  
  			msg="OK";
  			status="true";
  		}
  		}catch(Exception e) {
  
  			e.printStackTrace();
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameter_1TestServlet.java
  
  Index: GetParameter_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetParameter_1TestServlet.java,v 1.1 1999/11/09 01:33:00 vanitha Exp $
   * $Date: 1999/11/09 01:33:00 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Neagative test for getParameter(String)
   */
  
  public class GetParameter_1TestServlet extends GenericServletTest {
  
  
  	public String getTitle() {
  
  		return "GetParameter_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetParameter_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  
  		// putting title and description
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting parameter";
  
  		String status = "false";
  
  		//we are not settting any parameter
  		// in the client side
  		// so we should get null
  
  		if(request.getParameter("Anonymous") == null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetProtocolTestServlet.java
  
  Index: GetProtocolTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetProtocolTestServlet.java,v 1.1 1999/11/09 01:33:03 vanitha Exp $
   * $Date: 1999/11/09 01:33:03 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getProtocol()
   */
  
  
  public class GetProtocolTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetProtocolTestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetProtocolTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  	/**
  	 *	getProtocol returns the protocol used for
  	 *	this request.
  	 *	the method should return "HTTP/x+"
  	 */
  
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problenm getting protocol";
  		String status = "false";
  
  		String proto = request.getProtocol();
  
  		// looking for HTTP
  
  		if(proto.indexOf("HTTP")>-1) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetReaderTestServlet.java
  
  Index: GetReaderTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetReaderTestServlet.java,v 1.1 1999/11/09 01:33:04 vanitha Exp $
   * $Date: 1999/11/09 01:33:04 $
   *
   * 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.ServletRequest;
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for ServletRequest.getReader method
   */
  
  
  public class GetReaderTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetReaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetReaderTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting Reader";
  		String status = "false";
  
  		if(request.getReader()!=null) {
  
  			status="true";
  			msg="OK";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetReader_1TestServlet.java
  
  Index: GetReader_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetReader_1TestServlet.java,v 1.1 1999/11/09 01:33:04 vanitha Exp $
   * $Date: 1999/11/09 01:33:04 $
   *
   * 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.ServletRequest;
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import javax.servlet.ServletInputStream;
  import java.io.BufferedReader;
  import java.io.IOException;
  
  /**
   *	A Negative Test for ServletRequest.getReader method
   */
  
  public class GetReader_1TestServlet extends GenericServletTest {
  
  
  
  	public String getTitle() {
  
  		return "GetReader_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetReader_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  	/** 	We'll get InputStream object using
  	 *	ServletRequest.getInputStream()
  	 *	then we'll try to get the Reader Object
  	 *	An IllegalStateException should be thrown
  	 */
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Failed to raise Illegal State Exception";
  		String status = "false";
  
  		ServletInputStream sin = request.getInputStream();
  
  		try {
  
  			BufferedReader br = request.getReader();
  
  		}catch(IllegalStateException iae) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetRealPathTestServlet.java
  
  Index: GetRealPathTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetRealPathTestServlet.java,v 1.1 1999/11/09 01:33:05 vanitha Exp $
   * $Date: 1999/11/09 01:33:05 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class GetRealPathTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetRealPathTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRealPathTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting RealPath";
  		String status = "false";
  
  		String path="/servlet/tests.javax_Servlet.ServletRequest.GetRealPath";
  
  		String realPath = request.getRealPath(path);
  
  		if(realPath!=null) {
  
  			if(getServletContext().getRealPath(path).equals(realPath)) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetRemoteAddrTestServlet.java
  
  Index: GetRemoteAddrTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetRemoteAddrTestServlet.java,v 1.1 1999/11/09 01:33:05 vanitha Exp $
   * $Date: 1999/11/09 01:33:05 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getRemoteAddress()
   */
  
  
  public class GetRemoteAddrTestServlet extends GenericServletTest {
  
  /**
   *	getRemoteAddress gives the address from where the request
   *	originated(may even get the proxy's addr)
   */
  
  	public String getTitle() {
  
  		return "GetRemoteAddrTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRemoteAddrTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting Remote Address";
  		String status = "false";
  
  		if(request.getRemoteAddr()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetRemoteHostTestServlet.java
  
  Index: GetRemoteHostTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetRemoteHostTestServlet.java,v 1.1 1999/11/09 01:33:05 vanitha Exp $
   * $Date: 1999/11/09 01:33:05 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Test for getRemoteHost method
   */
  
  
  public class GetRemoteHostTestServlet extends GenericServletTest {
  
  /**
   *	getRemoteHost gives the fully qualified hostname of the
   *	agent that sent the request
   */
  
  	public String getTitle() {
  
  		return "GetRemoteHostTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRemoteHostTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem getting RemoteHost";
  		String status = "false";
  
  		//should get something
  
  		if(request.getRemoteHost()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetRequestDispatcherTestServlet.java
  
  Index: GetRequestDispatcherTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetRequestDispatcherTestServlet.java,v 1.1 1999/11/09 01:33:06 vanitha Exp $
   * $Date: 1999/11/09 01:33:06 $
   *
   * 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.ServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletContext;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	Test for getRequestDispatcher(String) method
   */
  
  public class GetRequestDispatcherTestServlet extends ServletTest {
  
  /**
   *	We will try to get the RequestDispatcher for this servlet
   *	itself
   */
  
  	public String getTitle() {
  
  		return "GetRequestDispatcherTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRequestDispatcherTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "problem getting Request Dipatcher";
  		String status = "false";
  
  		//path for this servlet
  		//ofcourse there are more cleaner ways to get it
  		//dynamicaly
  
  		String path="/servlet/tests.javax_servlet.ServletRequest.GetRequestDispatcherTestServlet";
  		RequestDispatcher rd = request.getRequestDispatcher(path);
  
  		if(rd!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetSchemeTestServlet.java
  
  Index: GetSchemeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetSchemeTestServlet.java,v 1.1 1999/11/09 01:33:06 vanitha Exp $
   * $Date: 1999/11/09 01:33:06 $
   *
   * 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.ServletRequest;
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getScheme method
   */
  
  
  public class GetSchemeTestServlet extends GenericServletTest {
  
   /**	getScheme gives the scheme of the url used in the request **/
  
  	public String getTitle() {
  
  		return "GetSchemeTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetSchemeTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting scheme";
  		String status = "false";
  
  		// check for some value
  
  		if(request.getScheme() !=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetServerNameTestServlet.java
  
  Index: GetServerNameTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetServerNameTestServlet.java,v 1.1 1999/11/09 01:33:07 vanitha Exp $
   * $Date: 1999/11/09 01:33:07 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Test for getServerName method
   */
  
  
  public class GetServerNameTestServlet extends GenericServletTest {
  
  
   /**	getServerName gives the name of the server that received the request */
  
  	public String getTitle() {
  
  		return "GetServerNameTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServerNameTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting Server name";
  		String status = "false";
  
  		if(request.getServerName()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetServerPortTestServlet.java
  
  Index: GetServerPortTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/GetServerPortTestServlet.java,v 1.1 1999/11/09 01:33:08 vanitha Exp $
   * $Date: 1999/11/09 01:33:08 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getServerPort method
   */
  
  
  public class GetServerPortTestServlet extends GenericServletTest {
  
  /** getServerPort gives the  port number on which the request was received **/
  
  	public String getTitle() {
  
  		return "GetServerPortTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServerPortTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting Server Port";
  		String status = "false";
  
  		int port=request.getServerPort();
  
  		//wrap it to an Integer
  
  		Integer portInt = new Integer(port);
  
  		if(portInt!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/SetAttributeTestServlet.java
  
  Index: SetAttributeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/SetAttributeTestServlet.java,v 1.1 1999/11/09 01:33:08 vanitha Exp $
   * $Date: 1999/11/09 01:33:08 $
   *
   * 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.ServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class SetAttributeTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "SetAttributeTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetAttributeTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "problem setting Attibute";
  		String status = "false";
  
  		request.setAttribute("Man","Patience");
  
  		String attr = (String)request.getAttribute("Man");
  
  		if(attr!=null) {
  
  			if(attr.equals("Patience")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/FlushBufferTestServlet.java
  
  Index: FlushBufferTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/FlushBufferTestServlet.java,v 1.1 1999/11/09 01:33:21 vanitha Exp $ 
   * $Date: 1999/11/09 01:33:21 $ 
   * $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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  /**
   *A Test for ServletResponse.flushBuffer method. 
   */ 
  
  public class FlushBufferTestServlet extends GenericServletTest {
  
  
  	public String getTitle () {
  
  		return "FlusBufferTestServlet";
  	}
  
  	public String getDescription () {
  
  		return "FlushBufferTestServlet";
  	}
  
  	//dummy
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  		return props;	
      	}
  
  
  
  	public void service(ServletRequest request, ServletResponse response) {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  
  			String msg="";
  			String status="true";
  
  
  			sos = response.getOutputStream();
  
  			response.setBufferSize(60);
  
  		/**	sos.println("Watchdog Wishing Tomcat");	**/
  
  			//after flushing the client should get this
  
  			response.setContentType("text/html");
  
  			response.flushBuffer();
  
  			sos.close();
  
  			props.put(Constants.Response.Status,"true");
  			props.put(Constants.Response.Message,"");
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  
  			
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  
  		props.save(sos, this.getClass().getName());	 
  	}	
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetBufferSizeTestServlet.java
  
  Index: GetBufferSizeTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetBufferSizeTestServlet.java,v 1.1 1999/11/09 01:33:28 vanitha Exp $ 
   * $Date: 1999/11/09 01:33:28 $ 
   * 
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  A Test for ServletResponse.setBufferSize method
   */
  
  public class GetBufferSizeTestServlet extends GenericServletTest {
  
  
  	public String getTitle () {
  
  		return "GetBufferSizeTestServlet";
  	}
  
  	public String getDescription () {
  
  		return "GetBufferSizeTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();        
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  	
  		String msg = "problem With  SetBuffeSize";
  		String status = "false";		
  	
  		response.setBufferSize(1000); 
  	
  		// needs to be non zero value.
  
  		if (response.getBufferSize() > 0) {
  
  			msg = "OK";	
  			status = "true";
  		}    
  
  		props.put(Constants.Response.Status,status);
  		props.put(Constants.Response.Message,msg);
  		return props;
  
      }
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetCharacterEncodingTestServlet.java
  
  Index: GetCharacterEncodingTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetCharacterEncodingTestServlet.java,v 1.1 1999/11/09 01:33:30 vanitha Exp $
   * $Date: 1999/11/09 01:33:30 $
   *
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class GetCharacterEncodingTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetCharacterEncodingTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetCharacterEncodingTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting Character Encoding";
  		String status = "false";
  
  		if(response.getCharacterEncoding()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetOutputStreamTestServlet.java
  
  Index: GetOutputStreamTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetOutputStreamTestServlet.java,v 1.1 1999/11/09 01:33:32 vanitha Exp $
   * $Date: 1999/11/09 01:33:32 $
   *
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /*
  * ServletResponse.getOutputStream gets the output stream of the
  * response
  */
  
  public class GetOutputStreamTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetOutputStreamTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetOutputStreamTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,
  ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		/* No need to test because
  		 * the ServletTest gets outputStream
  		 * if we do it here it will throw IllegalStateException
  		 * so just leaving it as it is.
  		 *
  		 */
  
  
  		props.put(Constants.Response.Status, "true");
  		props.put(Constants.Response.Message, "OK");
  
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetOutputStream_1TestServlet.java
  
  Index: GetOutputStream_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetOutputStream_1TestServlet.java,v 1.1 1999/11/09 01:33:33 vanitha Exp $
   * $Date: 1999/11/09 01:33:33 $
   *
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  
  public class GetOutputStream_1TestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetOutputStream_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetOutputStream_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  		return props;
  	}
  
  	public void service(ServletRequest request, ServletResponse response) {
  		/**
  		 *	We will get a PrintWriter object first
  		 *	and we will try to get an OutPutStream 
  		 *	Object. IllegalStateException should be
  		 *	thrown.
  		 */
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  
  			String msg="Failed to raise IllegalStateException";
  			String status="false";
  
  
  			PrintWriter pw=response.getWriter();
  
  			try {
  
  				response.getOutputStream();
  
  			}catch(IllegalStateException ise) {
  
  				pw.print("Passed");
  
  			}
  
  			pw.close();
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  			
  		}
  
  	}	
  
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetWriterTestServlet.java
  
  Index: GetWriterTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetWriterTestServlet.java,v 1.1 1999/11/09 01:33:35 vanitha Exp $
   * $Date: 1999/11/09 01:33:35 $
   *
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletResponse;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  
  public class GetWriterTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetWriterTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetWriterTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(ServletRequest request, ServletResponse response) {
  		Properties props = new Properties();
  
  		//ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  
  			String msg="Failed to raise IllegalStateException";
  			String status="false";
  				
  			PrintWriter pw = response.getWriter();
  
  			if(pw!=null) {
  
  				pw.println("Long Long ago");
  			}
  
  			props.put(Constants.Response.Status, status);
  			props.put(Constants.Response.Message, msg);
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  
  			
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  
  		//props.save(sos, this.getClass().getName());	 
  	}	
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetWriter_1TestServlet.java
  
  Index: GetWriter_1TestServlet.java
  ===================================================================
  /*
  
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/GetWriter_1TestServlet.java,v 1.1 1999/11/09 01:33:37 vanitha Exp $
   * $Date: 1999/11/09 01:33:37 $
   *
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  
  public class GetWriter_1TestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "GetWriter_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetWriter_1TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	public void service(ServletRequest request, ServletResponse response) {
  
  
  
  		/**
  		 *	We will getOutputStream and try to get
  		 *	PrintWriter object using getWriter,IllegalStateException 
  		 *	Should be thrown
  		 */
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  
  			String msg="Failed to raise IllegalStateException";
  			String status="false";
  
  
  			sos = response.getOutputStream();
  
  			try {
  				
  				response.getWriter();
  
  			}catch(IllegalStateException ise) {
  
  				msg="OK";
  				status="true";
  			}
  
  
  			props.put(Constants.Response.Status, status);
  			props.put(Constants.Response.Message, msg);
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  
  			
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  
  		props.save(sos, this.getClass().getName());	 
  	}	
  
  
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/IsCommittedTestServlet.java
  
  Index: IsCommittedTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/IsCommittedTestServlet.java,v 1.1 1999/11/09 01:33:39 vanitha Exp $ 
   * $Date: 1999/11/09 01:33:39 $ 
   * $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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  Test for ServletResponse.isCommitted method. 
   */
  
  public class IsCommittedTestServlet extends GenericServletTest {
  
  
  	public String getTitle () {
  
  		return "IsCommitedTestServlet";
  	}
  
  	public String getDescription () {
  
  		return "IsCommitedTestServlet";
  	}
  
  	//dummy
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  	
  		return props;
  	}
  
  	/**
  	 *	Before Flushing the buffer, invoke isCommitted, we should get false
  	 *	FlushBuffer and try to invoke isCommitted we should get true
  	 *
  	 */
  
  	public void service(ServletRequest request, ServletResponse response) {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos = null;
  				
  		try {
  
  			boolean notYet=false;
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  
  			String msg="Problem with isCommitted method";
  			String status="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)) {
  
  				msg="OK";
  				status="true";
  			}
  
  			props.put(Constants.Response.Status,status);
  			props.put(Constants.Response.Message,msg);
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  
  			
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  
  		props.save(sos, this.getClass().getName());	 
  	}	
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/ResetTestServlet.java
  
  Index: ResetTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/ResetTestServlet.java,v 1.1 1999/11/09 01:33:42 vanitha Exp $ 
   * $Date: 1999/11/09 01:33:42 $ 
   * $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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  A Test for ServletResponse.reset method
   */
  
  public class ResetTestServlet extends GenericServletTest {
  
  
  	public String getTitle () {
  
  		return	"ResetTest";
  	}
  
  	public String getDescription () {
  
  		return "ResetTest";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
           
  		return props;	
  	}
  
  	public void service(ServletRequest request, ServletResponse response) {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos = null;
  				
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  
  			sos = response.getOutputStream();
  
  			//set buffer size
  			response.setBufferSize(20);
  
  
  			//Write some data to the stream
  			response.setContentType("text/html");
  
  			response.reset();
  
  
  			props.put(Constants.Response.Status,"true");
  			props.put(Constants.Response.Message,"");
  
  		} catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,ioe.getMessage());
  
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknown Exception
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  
  		props.save(sos, this.getClass().getName());	 
  	}	
  
  
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/Reset_1TestServlet.java
  
  Index: Reset_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/Reset_1TestServlet.java,v 1.1 1999/11/09 01:33:43 vanitha Exp $ 
   * $Date: 1999/11/09 01:33:43 $ 
   * 
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import javax.servlet.ServletOutputStream;
  import java.util.Properties;
  import java.io.IOException;
  
  /**
   *	Negative Test for ServletResponse.clearBuffer method.
   *	@author Nikesh Anand
   */
  
  public class Reset_1TestServlet extends GenericServletTest {
  
  
  	/**
  	 *	ClearBuffer Method is called after the response is commited
  	 */
  
  
  	public String getTitle () {
  
  		return "Reset_1Test";
  	}
  
  	public String getDescription () {
  
  		return "Reset_1Test";
  	}
  
  	// dummy
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  
  	
  	/*	String status = "flase";		
  	
  		response.setBufferSize(11);		
  		pw.println("Tomcat is on the Move");
  		response.flushBuffer();
  	
  			
  		try {     	    
  			response.clearBuffer();
  
  		}catch(IllegalStateException e){
  
  			status = "true";
  			msg = "OK";
  
  		}	*/
           
  		return props;	
  	}
  
  
  	public void service(ServletRequest request, ServletResponse response) {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos = null;
  				
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  
  			String msg="Failed to raise IllegalStateException";
  			String status="false";
  
  			sos = response.getOutputStream();
  
  			//set buffer size
  			response.setBufferSize(20);
  
  			//commit the response
  
  			response.flushBuffer();
  
  			try {
  
  				//should throw IllegalStateException
  
  				response.reset();
  
  			}catch(IllegalStateException ise) {
  
  
  				msg="OK";
  				status="true";
  			}
  
  
  			props.put(Constants.Response.Status,status);
  			props.put(Constants.Response.Message,msg);
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknown Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  
  			
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  
  		props.save(sos, this.getClass().getName());	 
  	}	
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetBufferSizeTestServlet.java
  
  Index: SetBufferSizeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetBufferSizeTestServlet.java,v 1.1 1999/11/09 01:33:44 vanitha Exp $ 
   * $Date: 1999/11/09 01:33:44 $ 
   * $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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  A Test for ServletResponse.setBufferSize method
   */
  
  public class SetBufferSizeTestServlet extends GenericServletTest {
  
  
  	public String getTitle () {
  
  		return "SetBufferSizeTestServlet";
  	}
  
  	public String getDescription () {
  
  		return "SetBufferSizeTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();        
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  	
  		String msg = "problem With  SetBuffeSize";
  		String status = "false";		
  	
  		response.setBufferSize(1000); 
  	
  		// needs to be non zero value.
  
  		if (response.getBufferSize() > 0) {
  
  			msg = "OK";	
  			status = "true";
  		}    
  
  		props.put(Constants.Response.Status,status);
  		props.put(Constants.Response.Message,msg);
  		return props;
  
      }
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetBufferSize_2TestServlet.java
  
  Index: SetBufferSize_2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetBufferSize_2TestServlet.java,v 1.1 1999/11/09 01:33:45 vanitha Exp $ 
   * $Date: 1999/11/09 01:33:45 $ 
   * $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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  Negative Test for ServletResponse.setBufferSize method.
   *
   */
  
  public class SetBufferSize_2TestServlet extends GenericServletTest {
  
  
  
   /**
    *	Invoke setBufferSize method, after the content is written
    *	using ServletOutputStream.
    */
  
  
  	public String getTitle () {
  
  		return "SetBufferSize_2TestServlet";
  	}
  
  	public String getDescription () {
  
  		return "SetBufferSize_2TestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  
  		return props;
  	}
  
  	
  	public void service(ServletRequest request, ServletResponse response) {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos = null;
  				
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  
  			String msg="Failed to raise IllegalStateException";
  			String status="false";
  
  			sos = response.getOutputStream();
  
  			sos.println("Good Luck");
  
  
  			try {
  
  				//should IllegalStateException
  				response.setBufferSize(20);
  
  			}catch(IllegalStateException ise) {
  
  				msg="OK";
  				status="true";
  			}
  
  
  			props.put(Constants.Response.Status,status);
  			props.put(Constants.Response.Message,msg);
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  
  			props.put(Constants.Response.Exception,e.getMessage());
  
  			
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  
  		props.save(sos, this.getClass().getName());	 
  	}	
  
  
  
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetContentLengthTestServlet.java
  
  Index: SetContentLengthTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetContentLengthTestServlet.java,v 1.1 1999/11/09 01:33:46 vanitha Exp $
   * $Date: 1999/11/09 01:33:46 $
   *
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  
  
  public class SetContentLengthTestServlet extends GenericServletTest {
  
  	public String getTitle() {
  
  		return "SetContentLengthTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetContentLengthTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  
  	/**
  	 *	just setting content length to 10
  	 *
  	 */
  	/**	PrintWriter pw = response.getWriter();	**/
  
  		response.setContentLength(10);
  
  	/*	pw.print("Good Lucks");		*/
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetContentTypeTestServlet.java
  
  Index: SetContentTypeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetContentTypeTestServlet.java,v 1.1 1999/11/09 01:33:46 vanitha Exp $
   * $Date: 1999/11/09 01:33:46 $
   *
   * 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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  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 GenericServletTest {
  
  	public String getTitle() {
  
  		return "SetContentTypeTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetContentTypeTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request,ServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  
  					// Real testing  carried out
  		String status = "true"; // only in the client side
  					// so setting it to true
  
  		/**
  		* Setting content type to text/html. using
  		* get contenttype in the client side to check it
  		*/
  		response.setContentType("text/html");
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetLocaleTestServlet.java
  
  Index: SetLocaleTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetLocaleTestServlet.java,v 1.1 1999/11/09 01:33:46 vanitha Exp $ 
   * $Date: 1999/11/09 01:33:46 $ 
   * $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 org.apache.tools.moo.servlet.GenericServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Locale;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *  A Test for ServletResponse.setLocale method. 
   */ 
  
  public class SetLocaleTestServlet extends GenericServletTest {
  
  
  	public String getTitle () {
  
  		return "SetLocaleTestServlet";
  	}
  
  	public String getDescription () {
  
  		return "SetLocaleTestServlet";
  	}
  
  	public Properties doTest (ServletRequest request, ServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();        
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  	
  		String msg = "";
  		String status = "true";				
  
  		Locale loc = new Locale("en","US");
  
  		response.setLocale(loc);	
  	 
  		props.put(Constants.Response.Status,status);
  		props.put(Constants.Response.Message,msg);
  		return props;	
      }
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/SingleThreadModel/SingleModelTestServlet.java
  
  Index: SingleModelTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/SingleThreadModel/SingleModelTestServlet.java,v 1.1 1999/11/09 01:34:03 vanitha Exp $
   * $Date: 1999/11/09 01:34:03 $
   *
   * 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.SingleThreadModel;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.SingleThreadModel;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A test for SingleThreadModel interface
   */
  
  
  public class SingleModelTestServlet extends ServletTest implements SingleThreadModel {
  
  /**
   *	it is ensured that any servlet that implements this
   *	interface will have its service method accessed only
   *	by a single thread
   */
  
  	int testCount=0; // count for no of hits
  	int loopValue=0; // loopval should be some 200000
  
  	String msg = "";
  	String status = "true";
  
  	public String getTitle() {
  
  		return "SingleModelTestServlet";
  	}
  
  	public String getDescription() {
  		return "SingleModelTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		//increments for every thread
  		//accessing the service method
  
  		testCount++;
  
  		loop : {
  
  			while(loopValue<200000) {
  
  				if(testCount!=1) {
  
  					//failed
  
  					status="false";
  					msg="Failed to prohibit two threads from entrering Sevice method";
  					break loop;
  				}
  				else
  					loopValue++;
  
  
  			}
  			// if it comes here the test will pass
  			//countValue=0;
  			testCount--; //revert it back to 0
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/Constructor1TestServlet.java
  
  Index: Constructor1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/Constructor1TestServlet.java,v 1.1 1999/11/09 01:34:10 vanitha Exp $
   * $Date: 1999/11/09 01:34:10 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.Servlet;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class Constructor1TestServlet extends ServletTest {
  
  	/**
  	 *UnavailableException(Servlet servlet,String mesg)
  	 * constructs an UnavailabaleException object for
  	 * the specified servlet. This constructor reports
  	 * Permanent Unavailability
  	 */
  
  	public String getTitle() {
  
  		return "Constructor1TestServlet";
  	}
  
  	public String getDescription() {
  		return "Constructor1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg="problem Constructing UnavailableException";
  		msg = msg+"(javax.servlet.Servlet,java.lang.String) ";
  
  		String status = "false"; // if it fails
  
  		/**
  		 *  Constructing  one and throwing  it.
  		 *  catching the exception
  		 */
  
  		UnavailableException ue=new UnavailableException(this,"Exceptional");
  
  		try {
  
  			throw ue;
  
  		}catch(Exception e) {
  
  			// Got some exception
  
  			// is it UnavailableException
  
  			if(e instanceof UnavailableException) {
  
  				// seems so
  
  				//get the servlet and equate it with
  				// this
  
  				Servlet servlet = ue.getServlet();
  
  				// get Message
  
  				String mesg = e.getMessage();
  
  				// pass or fail
  
  				if(servlet.equals(this) && mesg.equals("Exceptional")) {
  				// They match. So passing it
  
  					msg="OK";
  					status="true";
  
  				} // else no match found
  			}
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/Constructor2TestServlet.java
  
  Index: Constructor2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/Constructor2TestServlet.java,v 1.1 1999/11/09 01:34:12 vanitha Exp $
   * $Date: 1999/11/09 01:34:12 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  
  public class Constructor2TestServlet extends ServletTest {
  
  /**
   *	constructs an UnavailableException object. The Servlet
   *	that wants to report Temp unavailability can use this.
   */
  
  	public String getTitle() {
  
  		return "Constructor2TestServlet";
  	}
  
  	public String getDescription() {
  		return "Constructor2TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem Constructing";
  		msg=msg+"UnavailableException(int,Servlet,String)";
  		String status = "false";
  
  		//constructing Temp UnavailableException object
  
  		UnavailableException ue=new UnavailableException(20,this,"Exceptional");
  
  		/** throw and catch the Exception
  		 */
  		try {
  			throw ue;
  
  		}catch(Exception e) {
  
  			if(e instanceof UnavailableException) {
  
  			  // Equate getServlet with this
  			  // Equate getMessage with the set message
  
  				if(ue.getUnavailableSeconds()==20
  					&& ue.getServlet().equals(this)
  					&& e.getMessage().equals("Exceptional")) {
  
  					msg="OK";
  					status="true";
  
  				}
  
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/Constructor3TestServlet.java
  
  Index: Constructor3TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/Constructor3TestServlet.java,v 1.1 1999/11/09 01:34:16 vanitha Exp $
   * $Date: 1999/11/09 01:34:16 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.Servlet;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class Constructor3TestServlet extends ServletTest {
  
  	/**
  	 *UnavailableException(String mesg)
  	 * constructs an UnavailabaleException object for
  	 * the specified servlet. This constructor reports
  	 * Permanent Unavailability
  	 */
  
  	public String getTitle() {
  
  		return "Constructor3TestServlet";
  	}
  
  	public String getDescription() {
  		return "Constructor3TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg="problem Constructing UnavailableException";
  		msg = msg+"(java.lang.String) ";
  
  		String status = "false"; // if it fails
  
  		/**
  		 *  Constructing  one and throwing  it.
  		 *  catching the exception
  		 */
  
  		UnavailableException ue=new UnavailableException("Exceptional");
  
  		try {
  
  			throw ue;
  
  		}catch(Exception e) {
  
  			// Got some exception
  
  			// is it UnavailableException
  
  			if(e instanceof UnavailableException) {
  
  				// seems so
  
  				// get Message
  
  				String mesg = e.getMessage();
  
  				// pass or fail
  
  				if(mesg.equals("Exceptional")) {
  				// They match. So passing it
  
  					msg="OK";
  					status="true";
  
  				} // else no match found
  			}
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/Constructor4TestServlet.java
  
  Index: Constructor4TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/Constructor4TestServlet.java,v 1.1 1999/11/09 01:34:17 vanitha Exp $
   * $Date: 1999/11/09 01:34:17 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.Servlet;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class Constructor4TestServlet extends ServletTest {
  
  	/**
  	 *UnavailableException(String mesg,int sec)
  	 * constructs an UnavailabaleException object for
  	 * the specified servlet. This constructor reports
  	 * Temporary Unavailability
  	 */
  
  	public String getTitle() {
  
  		return "Constructor3TestServlet";
  	}
  
  	public String getDescription() {
  		return "Constructor3TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg="problem Constructing UnavailableException";
  		msg = msg+"(java.lang.String,int) ";
  
  		String status = "false"; // if it fails
  
  		/**
  		 *  Constructing  one and throwing  it.
  		 *  catching the exception
  		 */
  
  		UnavailableException ue=new UnavailableException("Exceptional",20);
  
  		try {
  
  			throw ue;
  
  		}catch(Exception e) {
  
  			// Got some exception
  
  			// is it UnavailableException
  
  			if(e instanceof UnavailableException) {
  
  				// seems so
  
  
  
  				// get Unavailable Time
  
  				int uTime = ue.getUnavailableSeconds();
  
  				// get Message
  
  				String mesg = e.getMessage();
  
  				// pass or fail
  
  				if(uTime == 20 && mesg.equals("Exceptional")) {
  				// They match. So passing it
  
  					msg="OK";
  					status="true";
  
  				} // else no match found
  			}
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetServletTestServlet.java
  
  Index: GetServletTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetServletTestServlet.java,v 1.1 1999/11/09 01:34:17 vanitha Exp $
   * $Date: 1999/11/09 01:34:17 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.Servlet;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  public class GetServletTestServlet extends ServletTest {
  
  /**
   * 	getServlet method gets the servlet that is report Unavailability
   *
   *	Get the Servlet and equate it with this.
   */
  
  	public String getTitle() {
  
  		return "GetServletTestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetServletTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting Servlet";
  		String status = "false";
  
  
  		//Constructing
  
  		UnavailableException ue=new UnavailableException(this,"Message");
  
  		Servlet servlet = ue.getServlet();
  
  		if(servlet !=null) {
  
  			// got some Servlet
  
  			if(servlet.equals(this)) {
  
  				// They match
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetUnavailableSecondsTestServlet.java
  
  Index: GetUnavailableSecondsTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetUnavailableSecondsTestServlet.java,v 1.1 1999/11/09 01:34:19 vanitha Exp $
   * $Date: 1999/11/09 01:34:19 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Positive Test for getUnavailableSeconds
   */
  
  public class GetUnavailableSecondsTestServlet extends ServletTest {
  
  /**
   * GetUnavailableSeconds method returns the time in seconds uptill
   * which the servlet will be unavailable to process requests.
   *
   */
  
  	public String getTitle() {
  
  		return "GetUnavailableSecondsTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetUnavailableSecondsTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting UnavailableSeconds";
  		String status = "false";
  
  		//Constructing exception with unavailable secs 20
  
  		UnavailableException ue = new UnavailableException(20,this,"Message");
  
  		int secs = ue.getUnavailableSeconds();
  
  		if(secs==20) { // do we get 20
  
  			// oh yes
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetUnavailableSeconds_1TestServlet.java
  
  Index: GetUnavailableSeconds_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetUnavailableSeconds_1TestServlet.java,v 1.1 1999/11/09 01:34:20 vanitha Exp $
   * $Date: 1999/11/09 01:34:20 $
   *
   * 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.UnavailableException;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /*
   * 	Servlet Side Test for UnavailableException.GetUnavailableSeconds
   *	(Negative Test)
   */
  
  
  public class GetUnavailableSeconds_1TestServlet extends ServletTest {
  
  /**
   * GetUnavailableSeconds method returns the time in seconds uptill
   * which the servlet will be unavailable to process requests.
   *
   */
  
  	public String getTitle() {
  
  		return "GetUnavailableSeconds_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetUnavailableSeconds_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg="getUnavailableSeconds returned wrong value: -ve value expected";
  		String status = "false";
  
  		// Permanent Unavailablity
  
  		UnavailableException ue = new UnavailableException(this,"Message");
  
  		/** unavailable time not set while constructing the
  		 *  exception so a negative value is expected
  		 */
  		int secs = ue.getUnavailableSeconds();
  
  		if(secs<0) {
  
  			//Passed
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetUnavailableSeconds_3TestServlet.java
  
  Index: GetUnavailableSeconds_3TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetUnavailableSeconds_3TestServlet.java,v 1.1 1999/11/09 01:34:21 vanitha Exp $
   * $Date: 1999/11/09 01:34:21 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Positive Test for getUnavailableSeconds
   */
  
  public class GetUnavailableSeconds_3TestServlet extends ServletTest {
  
  /**
   * GetUnavailableSeconds method returns the time in seconds uptill
   * which the servlet will be unavailable to process requests.
   *
   */
  
  	public String getTitle() {
  
  		return "GetUnavailableSecondsTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetUnavailableSecondsTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem getting UnavailableSeconds";
  		String status = "false";
  
  		//Constructing exception with unavailable secs 20
  
  		UnavailableException ue = new UnavailableException("Message",20);
  
  		int secs = ue.getUnavailableSeconds();
  
  		if(secs==20) { // do we get 20
  
  			// oh yes
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetUnavailableSeconds_4TestServlet.java
  
  Index: GetUnavailableSeconds_4TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/GetUnavailableSeconds_4TestServlet.java,v 1.1 1999/11/09 01:34:22 vanitha Exp $
   * $Date: 1999/11/09 01:34:22 $
   *
   * 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.UnavailableException;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /*
   * 	Servlet Side Test for UnavailableException.GetUnavailableSeconds
   *	(Negative Test)
   */
  
  
  public class GetUnavailableSeconds_4TestServlet extends ServletTest {
  
  /**
   * GetUnavailableSeconds method returns the time in seconds uptill
   * which the servlet will be unavailable to process requests.
   *
   */
  
  	public String getTitle() {
  
  		return "GetUnavailableSeconds_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetUnavailableSeconds_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg="getUnavailableSeconds returned wrong value: -ve value expected";
  		String status = "false";
  
  		// Permanent Unavailablity
  
  		UnavailableException ue = new UnavailableException("Message");
  
  		/** unavailable time not set while constructing the
  		 *  exception so a negative value is expected
  		 */
  		int secs = ue.getUnavailableSeconds();
  
  		if(secs<0) {
  
  			//Passed
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/IsPermanentTestServlet.java
  
  Index: IsPermanentTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/IsPermanentTestServlet.java,v 1.1 1999/11/09 01:34:24 vanitha Exp $
   * $Date: 1999/11/09 01:34:24 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Servlet side test for isPermanent  method
   */
  
  
  public class IsPermanentTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "IsPermanentTestServlet";
  	}
  
  	public String getDescription() {
  		return "IsPermanentTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem with isPermanent()  ";
  		String status = "false";
  
  		// setting unavailable secs for one object and not
  		// for the other.
  
  		UnavailableException ue = new UnavailableException(10,this,"Meassage");
  		UnavailableException ud = new UnavailableException(this,"Meassage");
  
  		// one should return false and one should return true
  
  		if(ue.isPermanent()==false && ud.isPermanent()==true) {
  
  			//Passed
  
  			msg="OK";
  			status="true";
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/IsPermanent_1TestServlet.java
  
  Index: IsPermanent_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/UnavailableException/IsPermanent_1TestServlet.java,v 1.1 1999/11/09 01:34:25 vanitha Exp $
   * $Date: 1999/11/09 01:34:25 $
   *
   * 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.UnavailableException;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.UnavailableException;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Servlet side test for isPermanent  method
   */
  
  
  public class IsPermanent_1TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "IsPermanentTestServlet";
  	}
  
  	public String getDescription() {
  		return "IsPermanentTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Problem with isPermanent()  ";
  		String status = "false";
  
  		// setting unavailable secs for one object and not
  		// for the other.
  
  		UnavailableException ue = new UnavailableException("Meassage",20);
  		UnavailableException ud = new UnavailableException("Meassage");
  
  		// one should return false and one should return true
  
  		if(ue.isPermanent()==false && ud.isPermanent()==true) {
  
  			//Passed
  
  			msg="OK";
  			status="true";
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/ConstructorTestServlet.java
  
  Index: ConstructorTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/ConstructorTestServlet.java,v 1.1 1999/11/09 01:34:35 vanitha Exp $
   * $Date: 1999/11/09 01:34:35 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for Cookie(String,String) constructor
   */
  
  
  public class ConstructorTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "ConstructorTestServlet";
  	}
  
  	public String getDescription() {
  		return "ConstructorTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Constructor failed";
  		String status = "false";
  
  		//construct a Cookie
  
  		Cookie cooky  = new Cookie("test","value");
  
  		//check its name and value
  
  		if(cooky.getName().equals("test") && cooky.getValue().equals("value")) {
  
  			msg="ok";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/Constructor_1TestServlet.java
  
  Index: Constructor_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/Constructor_1TestServlet.java,v 1.1 1999/11/09 01:34:36 vanitha Exp $
   * $Date: 1999/11/09 01:34:36 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for Cookie(String,String) constructor
   */
  
  
  
  public class Constructor_1TestServlet extends ServletTest {
  
  /**
   *	We include some invalid  chars in the Cookie name
   *	We expect IllegalArgumentException
   */
  
  	public String getTitle() {
  
  		return "Constructor_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "Constructor_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Constructor failed";
  		String status = "false";
  
  		try {
  
  			Cookie cooky=new Cookie("-;)test","Valueless");
  
  		}catch(IllegalArgumentException iae) {
  			msg="ok";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/CookieCloneTestServlet.java
  
  Index: CookieCloneTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/CookieCloneTestServlet.java,v 1.1 1999/11/09 01:34:37 vanitha Exp $
   * $Date: 1999/11/09 01:34:37 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Test for Cookie.clone()
   */
  
  public class CookieCloneTestServlet extends ServletTest {
  
  /**
   *	As Cookie implements Cloneable interface,we
   *	should be able to get a Cloned object for
   *	Cookie
   */
  
  	public String getTitle() {
  
  		return "CookieCloneTestServlet";
  	}
  
  	public String getDescription() {
  		return "CookieCloneTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Cloning failed";//rem clones are not real ones
  		String status = "false";
  
  		Cookie cooky = new Cookie("test","30");
  
  		Cookie cloneCooky = (Cookie) cooky.clone();
  
  		//equating clone's name with orig cookies name
  
  		if(cloneCooky.getName().equals(cooky.getName())) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetCommentTestServlet.java
  
  Index: GetCommentTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetCommentTestServlet.java,v 1.1 1999/11/09 01:34:38 vanitha Exp $
   * $Date: 1999/11/09 01:34:38 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	 A Test for getComment method
   */
  
  public class GetCommentTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetCommentTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetCommentTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Comment not properly got";
  
  		String status = "false";
  
  		Cookie cooky = new Cookie("test","comments");
  
  		//set and get
  
  		cooky.setComment("Tastes so nice");
  
  		if(cooky.getComment().equals("Tastes so nice")) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetComment_01TestServlet.java
  
  Index: GetComment_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetComment_01TestServlet.java,v 1.1 1999/11/09 01:34:39 vanitha Exp $
   * $Date: 1999/11/09 01:34:39 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getComment method
   */
  
  
  
  public class GetComment_01TestServlet extends ServletTest {
  
  /**
   *	Here we try to getComment without setting any
   *	we expect null as the result
   */
  
  	public String getTitle() {
  
  		return "GetComment_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetComment_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Comment not properly got";
  
  		String status = "false";
  
  		Cookie cooky = new Cookie("test","comments");
  
  
  		if(cooky.getComment()==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetDomainTestServlet.java
  
  Index: GetDomainTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetDomainTestServlet.java,v 1.1 1999/11/09 01:34:40 vanitha Exp $
   * $Date: 1999/11/09 01:34:40 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getDomain method
   */
  
  
  public class GetDomainTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetDomainTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetDomainTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Wrong domain value returned";
  		String status = "false";
  
  
  		Cookie cooky = new Cookie("test","val");
  
  		//set and get
  
  		cooky.setDomain("/");
  
  		if(cooky.getDomain().equals("/")) {
  
  			msg="ok";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetDomain_1TestServlet.java
  
  Index: GetDomain_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetDomain_1TestServlet.java,v 1.1 1999/11/09 01:34:40 vanitha Exp $
   * $Date: 1999/11/09 01:34:40 $
   *
   * 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_http.Cookie;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getDomain method
   */
  
  
  public class GetDomain_1TestServlet extends ServletTest {
  
  /**
   *	We'll try to get the domain without
   *	actually setting any domain for the Cookie
   */
  
  	public String getTitle() {
  
  		return "GetDomain_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetDomain_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Returned wrong domain value";
  		String status = "false";
  
  		Cookie cooks = new Cookie("test","1");
  
  		if(cooks.getDomain()==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetMaxAgeTestServlet.java
  
  Index: GetMaxAgeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetMaxAgeTestServlet.java,v 1.1 1999/11/09 01:34:40 vanitha Exp $
   * $Date: 1999/11/09 01:34:40 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getMaxAge method
   */
  
  
  public class GetMaxAgeTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetMaxAgeTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMaxAgeTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Returned wrong value";
  		String status = "false";
  
  		Cookie cok = new Cookie("test","value");
  
  		//set and get
  
  		cok.setMaxAge(5000);
  
  		if(cok.getMaxAge()==5000) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetMaxAge_1TestServlet.java
  
  Index: GetMaxAge_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetMaxAge_1TestServlet.java,v 1.1 1999/11/09 01:34:41 vanitha Exp $
   * $Date: 1999/11/09 01:34:41 $
   *
   * 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_http.Cookie;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A negative test for getMaxAge method
   */
  
  
  public class GetMaxAge_1TestServlet extends ServletTest {
  
  /**
   *	We will try to get Cookies max age without
   *	setting any
   */
  
  	public String getTitle() {
  
  		return "GetMaxAge_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMaxAge_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Returned Wrong value";
  		String status = "false";
  
  		Cookie cook = new Cookie("test","value");
  
  		//we expect a negative value
  
  		if(cook.getMaxAge()<0) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetNameTestServlet.java
  
  Index: GetNameTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetNameTestServlet.java,v 1.1 1999/11/09 01:34:41 vanitha Exp $
   * $Date: 1999/11/09 01:34:41 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getName method
   */
  
  public class GetNameTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetNameTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetNameTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid value";
  		String status = "false";
  
  		Cookie cooky = new Cookie("test","value");
  
  		String s= cooky.getName();
  
  		//we should get a not null value
  
  		if(s!=null) {
  
  			if(s.equals("test")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetPathTestServlet.java
  
  Index: GetPathTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetPathTestServlet.java,v 1.1 1999/11/09 01:34:41 vanitha Exp $
   * $Date: 1999/11/09 01:34:41 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A  Test for Cookie.getPath method
   */
  
  
  public class GetPathTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetPathTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetPathTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid path";
  		String status = "false";
  
  		Cookie cook = new Cookie("test","val");
  
  		cook.setPath("/");
  
  		String s = cook.getPath();
  		if(s!=null) {
  
  			if(s.equals("/")) {
  
  				msg="OK";
  				status="true";
  			}
  
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetPath_1TestServlet.java
  
  Index: GetPath_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetPath_1TestServlet.java,v 1.1 1999/11/09 01:34:42 vanitha Exp $
   * $Date: 1999/11/09 01:34:42 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for Cookie.getPath method
   */
  
  
  public class GetPath_1TestServlet extends ServletTest {
  
  /**
   *	We will try to getPath without setting any
   */
  
  	public String getTitle() {
  
  		return "GetPath_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetPath_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid path";
  		String status = "false";
  
  		Cookie cook = new Cookie("test","val");
  
  		if(cook.getPath()==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetSecureTestServlet.java
  
  Index: GetSecureTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetSecureTestServlet.java,v 1.1 1999/11/09 01:34:44 vanitha Exp $
   * $Date: 1999/11/09 01:34:44 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getSecure method
   */
  
  
  public class GetSecureTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetSecureTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetSecureTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Wrong value";
  		String status = "false";
  
  		Cookie[]  cook = request.getCookies();
  		Cookie  cook1 = cook[0];
  
  		cook1.setSecure(false);
  
  		//we don't know how the cookie will be received
  		// whether over a secured layer or over 
  		// any other layer
  		// so just pass it
  
  		if(cook1.getSecure()==false || cook1.getSecure()==true) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetValueTestServlet.java
  
  Index: GetValueTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetValueTestServlet.java,v 1.1 1999/11/09 01:34:46 vanitha Exp $
   * $Date: 1999/11/09 01:34:46 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getValue method
   */
  
  
  public class GetValueTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetValueTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetValueTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "INvalid Value";
  		String status = "false";
  
  		//setting value
  
  		Cookie cook = new Cookie("test","value");
  
  		//getting value
  		String value = cook.getValue();
  
  		if(value!=null) {
  
  			if(value.equals("value")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetVersionTestServlet.java
  
  Index: GetVersionTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/GetVersionTestServlet.java,v 1.1 1999/11/09 01:34:50 vanitha Exp $
   * $Date: 1999/11/09 01:34:50 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getVersion method
   */
  
  
  public class GetVersionTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetVersionTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetVersionTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid Version";
  		String status = "false";
  
  		Cookie cooky = new Cookie("can","food");
  
  		//set version
  		cooky.setVersion(6);
  
  		//get version and check if what we set is what we got
  		if(cooky.getVersion()==6) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetCommentTestServlet.java
  
  Index: SetCommentTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetCommentTestServlet.java,v 1.1 1999/11/09 01:34:53 vanitha Exp $
   * $Date: 1999/11/09 01:34:53 $
   *
   * 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_http.Cookie;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for setVersion method
   */
  
  
  public class SetCommentTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SetCommentTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetCommentTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Comment not set properly";
  		String status = "false";
  
  		Cookie cooky = new Cookie("test","comments");
  
  		//set comment
  
  		cooky.setComment("Tastes so nice");
  
  		//get and see if it is properly set
  
  		if(cooky.getComment().equals("Tastes so nice")) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetDomainTestServlet.java
  
  Index: SetDomainTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetDomainTestServlet.java,v 1.1 1999/11/09 01:34:54 vanitha Exp $
   * $Date: 1999/11/09 01:34:54 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for setDomain method
   */
  
  
  public class SetDomainTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SetDomainTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetDomainTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Domainnot set correctly";
  		String status = "false";
  
  		Cookie cook = new Cookie("cooked","rice");
  
  		//set get and check if there are equal
  
  		cook.setDomain("/");
  
  		if(cook.getDomain().equals("/")) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetMaxAgeTestServlet.java
  
  Index: SetMaxAgeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetMaxAgeTestServlet.java,v 1.1 1999/11/09 01:34:56 vanitha Exp $
   * $Date: 1999/11/09 01:34:56 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for setMaxAge method
   */
  
  
  public class SetMaxAgeTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SetMaxAgeTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetMaxAgeTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid value";
  		String status = "false";
  
  		Cookie cook = new Cookie("rice","cooker");
  
  		//setting maxage to 3000
  
  		cook.setMaxAge(3000);
  
  		//get max age and test if it is = 3000
  
  		if(cook.getMaxAge()==3000) {
  
  			msg="true";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetPathTestServlet.java
  
  Index: SetPathTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetPathTestServlet.java,v 1.1 1999/11/09 01:34:58 vanitha Exp $
   * $Date: 1999/11/09 01:34:58 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for setPath method
   */
  
  public class SetPathTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SetPathTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetPathTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid path";
  		String status = "false";
  
  		Cookie cook = new Cookie("cookie","value");
  
  		//set get and check
  
  		cook.setPath("/");
  
  		if(cook.getPath()!=null) {
  
  			if(cook.getPath().equals("/")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetSecureTestServlet.java
  
  Index: SetSecureTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetSecureTestServlet.java,v 1.1 1999/11/09 01:35:00 vanitha Exp $
   * $Date: 1999/11/09 01:35:00 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getSecure Method
   */
  
  
  public class SetSecureTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SetSecureTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetSecureTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to set the value properyly";
  		String status = "false";
  
  		Cookie cooky = new Cookie("Well","Secured");
  
  		//secure it
  
  		cooky.setSecure(true);
  
  		//is it actually secure
  		//there is actually a better way to check this
  		// in the client side
  
  		response.addCookie(cooky);
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetValueTestServlet.java
  
  Index: SetValueTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetValueTestServlet.java,v 1.1 1999/11/09 01:35:03 vanitha Exp $
   * $Date: 1999/11/09 01:35:03 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for setValue method
   */
  
  
  public class SetValueTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SetValueTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetValueTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Invalid Value";
  		String status = "false";
  
  		Cookie cooky = new Cookie("test","30");
  
  		//set value
  		cooky.setValue("50");
  
  		String val = cooky.getValue();
  
  		//there is actually a better way to
  		//check it in the client side
  
  		if(val!=null) {
  
  			if(val.equals("50")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetVersionTestServlet.java
  
  Index: SetVersionTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/Cookie/SetVersionTestServlet.java,v 1.1 1999/11/09 01:35:08 vanitha Exp $
   * $Date: 1999/11/09 01:35:08 $
   *
   * 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_http.Cookie;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for setVersion method
   */
  
  public class SetVersionTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SetVersionTestServlet";
  	}
  
  	public String getDescription() {
  		return "SetVersionTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Could not Set Version";
  		String status = "false";
  
  		Cookie cooky = new Cookie("nice","chef");
  
  		//set get and check
  
  		cooky.setVersion(7);
  
  		if(cooky.getVersion()==7) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetAuthTypeTestServlet.java
  
  Index: GetAuthTypeTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetAuthTypeTestServlet.java,v 1.1 1999/11/09 01:35:21 vanitha Exp $
   * $Date: 1999/11/09 01:35:21 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getAuthType method
   */
  
  
  public class GetAuthTypeTestServlet extends ServletTest {
  
  /**
   *	We are just looking for a not null value
   */
  
  	public String getTitle() {
  
  		return "GetAuthTypeTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetAuthTypeTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "AuthType Returned null";
  		String status = "false";
  
  
  		//server may not see the Auth header
  		//if it doesn't wants to.
  		if(request.getAuthType()==null||request.getAuthType().toUpperCase().equals("BASIC")) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetContextPathTestServlet.java
  
  Index: GetContextPathTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetContextPathTestServlet.java,v 1.1 1999/11/09 01:35:29 vanitha Exp $
   * $Date: 1999/11/09 01:35:29 $
   *
   * 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_http.HttpServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for GetContextPath() method
   */
  
  
  public class GetContextPathTestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "GetContextPathTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetContextPathTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem  Getting ContextPath";
  		String status = "false";
  
  		String contextPath=request.getContextPath();
  
  		if(contextPath!=null && (!contextPath.endsWith("/"))) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetCookiesTestServlet.java
  
  Index: GetCookiesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetCookiesTestServlet.java,v 1.1 1999/11/09 01:35:32 vanitha Exp $
   * $Date: 1999/11/09 01:35:32 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getCookies Method
   */
  
  
  public class GetCookiesTestServlet extends ServletTest {
  
  /**
   *	We sent some Cookies from the client side
   *	We should be able to get them here
   */
  
  	public String getTitle() {
  
  		return "GetCookiesTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetCookiesTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "OK";
  		String status = "true";
  		Cookie cookies[]=null;
  
  		boolean gotCookie=false;
  
  		if((request.getCookies() instanceof Cookie[])) {
  
  			cookies = request.getCookies();
  			gotCookie=true;
  		}
  		else {
  
  			status="flase";
  			msg="getCookies()did not return an object of type Cookie[]";
  		}
  
  		if(gotCookie) {
  
  			int j=cookies.length;
  
  			if(j<1) {
  
  				msg="getCookies failed to get all cookies set";
  				status="false";
  			}
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetCookies_01TestServlet.java
  
  Index: GetCookies_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetCookies_01TestServlet.java,v 1.1 1999/11/09 01:35:37 vanitha Exp $
   * $Date: 1999/11/09 01:35:37 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.Cookie;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getCookies Method
   */
  
  
  public class GetCookies_01TestServlet extends ServletTest {
  
  /**
   *	We are not sending any Cookie from
   *	the client side.We expect a null array of Cookie
   */
  
  	public String getTitle() {
  
  		return "GetCookies_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetCookies_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "getCookies getting unset cookies";
  		String status = "false";
  
  		Cookie[] cook=request.getCookies();
  
  		if(cook==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		if(cook.length==0) {
  			msg="OK";
  			status="true";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetDateHeaderTestServlet.java
  
  Index: GetDateHeaderTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetDateHeaderTestServlet.java,v 1.1 1999/11/09 01:35:40 vanitha Exp $
   * $Date: 1999/11/09 01:35:40 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Date;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getDateHeader Method
   */
  
  public class GetDateHeaderTestServlet extends ServletTest {
  
  /**
   *	In the Client side we are sending a
   *	date format Header
   */
  
  	public String getTitle() {
  
  		return "GetDateHeaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetDateHeaderTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "getDateHeader failed to receive header in date format";
  
  		String status = "false";
  
  		long date = request.getDateHeader("If-Modified-since");
  
  		if(new Date(date)!= null ) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetDateHeader_01TestServlet.java
  
  Index: GetDateHeader_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetDateHeader_01TestServlet.java,v 1.1 1999/11/09 01:35:42 vanitha Exp $
   * $Date: 1999/11/09 01:35:42 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Negative Test for getDateHeader Method
   */
  
  public class GetDateHeader_01TestServlet extends ServletTest {
  
  /**
   *	we sent no Header  from  the client side
   *	we should get null
   */
  
  	public String getTitle() {
  
  		return "GetDateHeader_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetDateHeader_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "OK";
  		String status = "true";
  
  		if(request.getDateHeader("Cookie")!=-1) {
  
  			msg="getDateHeader accessing unset values";
  			status="false";
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetDateHeader_02TestServlet.java
  
  Index: GetDateHeader_02TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetDateHeader_02TestServlet.java,v 1.1 1999/11/09 01:35:44 vanitha Exp $
   * $Date: 1999/11/09 01:35:44 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Negative Test for getDateHeader Method
   */
  
  
  public class GetDateHeader_02TestServlet extends ServletTest {
  
  /**
   *	We sent a Header which is not ofn Date format
   *	We should get IllegalArgumentException
   */
  
  	public String getTitle() {
  
  		return "GetDateHeader_02TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetDateHeader_02TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to raise IllegalArgumentException";
  		String status = "false";
  
  		try {
  
  			long date = request.getDateHeader("If-Modified-Since");
  			System.out.println("date:"+date);
  
  		}catch(IllegalArgumentException iae) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeaderNamesTestServlet.java
  
  Index: GetHeaderNamesTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeaderNamesTestServlet.java,v 1.1 1999/11/09 01:35:46 vanitha Exp $
   * $Date: 1999/11/09 01:35:46 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getHeaderNames method
   */
  
  public class GetHeaderNamesTestServlet extends ServletTest {
  
  /**
   *	we set two headers in the client side
   *	we should get them here
   */
  
  
  	public String getTitle() {
  
  		return "GetHeaderNamesTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetHeaderNamesTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "OK";
  		String status = "true";
  
  		Enumeration e = request.getHeaderNames();
  
  		int count =0;//header name count
  
  		while(e.hasMoreElements()) {
  
  			count++;
  			e.nextElement();
  		}
  		//2 headers have been set actually.
  
  		if(count<2) {
  
  			status="false";
  			msg="getHeaderNames() failed to get header names";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeaderTestServlet.java
  
  Index: GetHeaderTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeaderTestServlet.java,v 1.1 1999/11/09 01:35:48 vanitha Exp $
   * $Date: 1999/11/09 01:35:48 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A  Test for getHeader(String)  Method
   */
  
  public class GetHeaderTestServlet extends ServletTest {
  
  /**
   *	We sent a Cookie Header from the clilent side
   */
  
  	public String getTitle() {
  
  		return "GetHeaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetHeaderTest";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "getHeader failed to get the header value";
  		String status = "false";
  
  		if(request.getHeader("Cookie")!=null) {
  			status="true";
  			msg="OK";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeader_01TestServlet.java
  
  Index: GetHeader_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeader_01TestServlet.java,v 1.1 1999/11/09 01:35:49 vanitha Exp $
   * $Date: 1999/11/09 01:35:49 $
   *
   * 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_http.HttpServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getHeader(String) method
   */
  
  
  public class GetHeader_01TestServlet extends ServletTest {
  
  /** We don't set any header in the client side **/
  
  	public String getTitle() {
  
  		return "GetHeader_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetHeader_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "OK";
  		String status = "true";
  
  		if(request.getHeader("Cookie")!=null) {
  
  			msg="getHeader(String) failed:getting unset header value";
  			status="false";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeadersTestServlet.java
  
  Index: GetHeadersTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeadersTestServlet.java,v 1.1 1999/11/09 01:35:50 vanitha Exp $
   * $Date: 1999/11/09 01:35:50 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A  Test for getHeader(String)  Method
   */
  
  public class GetHeadersTestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "GetHeadersTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetHeadersTest";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting headers";
  		String status = "false";
  
  
  		Enumeration headers = request.getHeaders("Accept-Language");
  
  		// we set two values in the client side
  
  
  		if(headers.hasMoreElements()) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeaders_01TestServlet.java
  
  Index: GetHeaders_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetHeaders_01TestServlet.java,v 1.1 1999/11/09 01:35:52 vanitha Exp $
   * $Date: 1999/11/09 01:35:52 $
   *
   * 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_http.HttpServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getHeaders(String) method
   */
  
  
  public class GetHeaders_01TestServlet extends ServletTest {
  
  /** We don't set any header in the client side **/
  
  	public String getTitle() {
  
  		return "GetHeaders_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetHeaders_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem Getting Headers:getting unset Headers";
  		String status = "false";
  
  		Enumeration emptyHeaders=request.getHeaders("Accept-Language");
  
  		if(!emptyHeaders.hasMoreElements()) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetIntHeaderTestServlet.java
  
  Index: GetIntHeaderTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetIntHeaderTestServlet.java,v 1.1 1999/11/09 01:35:52 vanitha Exp $
   * $Date: 1999/11/09 01:35:52 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Test for getIntHeader(String) Method
   */
  
  
  public class GetIntHeaderTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetIntHeaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetIntHeaderTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "OK";
  		String status = "true";
  
  		try {
  
  			int testInt = request.getIntHeader("Cookie");
  		}catch(NumberFormatException nfe) {
  
  			msg ="getIntHeader failed to get value in integer Format";
  			status="false";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetIntHeader_1TestServlet.java
  
  Index: GetIntHeader_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetIntHeader_1TestServlet.java,v 1.1 1999/11/09 01:35:55 vanitha Exp $
   * $Date: 1999/11/09 01:35:55 $
   *
   * 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_http.HttpServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Negative Test for getIntHeader(String) Method
   */
  
  
  public class GetIntHeader_1TestServlet extends ServletTest {
  
  /**
   *	We are sending a non numeric valued header from
   *	the client side
   */
  
  	public String getTitle() {
  
  		return "GetIntHeader_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetIntHeader_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed:getIntHeader(String) Did not  raise NumberFormatException";
  		String status = "false";
  		try {
  
  		int testInt=request.getIntHeader("Cookie");
  
  		}catch(NumberFormatException nfe) {
  
  			msg="OK";
  			status="true";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetIntHeader_2TestServlet.java
  
  Index: GetIntHeader_2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetIntHeader_2TestServlet.java,v 1.1 1999/11/09 01:35:56 vanitha Exp $
   * $Date: 1999/11/09 01:35:56 $
   *
   * 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_http.HttpServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A  Negative Test for getIntHeader(String) Method
   */
  
  
  public class GetIntHeader_2TestServlet extends ServletTest {
  
  /**
   *	We did not set any header in the client side
   *	we expect null here
   */
  
  	public String getTitle() {
  
  		return "GetIntHeader_2TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetIntHeader_2TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "OK";
  		String status = "true";
  		try {
  
  			int testInt=request.getIntHeader("Cookie");
  			if(testInt>=0) {
  				status="true";
  				msg="getIntHeader(String) getting unset headers";
  			}
  		}catch(IllegalArgumentException iae) {
  
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetMethodTestServlet.java
  
  Index: GetMethodTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetMethodTestServlet.java,v 1.1 1999/11/09 01:35:57 vanitha Exp $
   * $Date: 1999/11/09 01:35:57 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A  Negative Test for getMethod() Method
   */
  
  public class GetMethodTestServlet extends ServletTest {
  
  /**	Requested method was GET(default)	**/
  
  	public String getTitle() {
  
  		return "GetMethodTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMethodTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to receive the correct method type";
  		String status = "false";
  
  		if(request.getMethod().equals("GET")) {
  
  			status="true";
  			msg="OK";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetMethod_HEADTestServlet.java
  
  Index: GetMethod_HEADTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetMethod_HEADTestServlet.java,v 1.1 1999/11/09 01:35:59 vanitha Exp $
   * $Date: 1999/11/09 01:35:59 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getMethod() Method
   */
  
  
  public class GetMethod_HEADTestServlet extends ServletTest {
  
  
  /** 	Requested  method was HEAD 	**/
  
  	public String getTitle() {
  
  		return "GetMethod_HEADTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMethod_HEADTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  	try {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "GetMethod did not return HEAD";
  		String status = "false";
  
  		String method = request.getMethod();
  
  		if(method!=null) {
  
  			if(method.trim().equals("HEAD")) {
  
  				msg="OK";
  				status="true";
  			}
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  
  	}catch(Exception e) {
  
  		e.printStackTrace();
  	}
  		return new Properties();
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetMethod_POSTTestServlet.java
  
  Index: GetMethod_POSTTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetMethod_POSTTestServlet.java,v 1.1 1999/11/09 01:36:03 vanitha Exp $
   * $Date: 1999/11/09 01:36:03 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A  Test for getMethod() Method
   */
  
  
  public class GetMethod_POSTTestServlet extends ServletTest {
  
  /** 	Requested method was POST	**/
  
  	public String getTitle() {
  
  		return "GetMethod_POSTTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetMethod_POSTTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "didn/'t receive POST ";
  		String status = "false";
  
  		if(request.getMethod().equals("POST")) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetPathInfoTestServlet.java
  
  Index: GetPathInfoTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetPathInfoTestServlet.java,v 1.1 1999/11/09 01:36:05 vanitha Exp $
   * $Date: 1999/11/09 01:36:05 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getPathInfo method
   */
  
  
  public class GetPathInfoTestServlet extends ServletTest {
  
  /**
   *	getPathInfo fetches any extra path information specified
   *	along with the ServletPath. We actually supplied some extra path
   */
  
  	public String getTitle() {
  
  		return "GetPathInfoTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetPathInfoTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to retrieve information";
  		String status = "false";
  
  		if(request.getPathInfo()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetPathInfo_01TestServlet.java
  
  Index: GetPathInfo_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetPathInfo_01TestServlet.java,v 1.1 1999/11/09 01:36:07 vanitha Exp $
   * $Date: 1999/11/09 01:36:07 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getPathInfo method
   */
  
  
  public class GetPathInfo_01TestServlet extends ServletTest {
  
  /**
   *	getPathInfo fetches any extra path information specified
   *	along with the ServletPath
   *	we did not supply any extra path.so we expect null
   */
  
  	public String getTitle() {
  
  		return "GetPathInfo_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetPathInfo_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Retrieved spurious information";
  		String status = "false";
  		//should retrieve any extra path info coz nothing was provided
  		if(request.getPathInfo()==null) {
  
  			msg="OK";
  			status="true";
  		}
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetPathTranslatedTestServlet.java
  
  Index: GetPathTranslatedTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetPathTranslatedTestServlet.java,v 1.1 1999/11/09 01:36:09 vanitha Exp $
   * $Date: 1999/11/09 01:36:09 $
   *
   * 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_http.HttpServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getPathTranslated method
   */
  
  
  
  public class GetPathTranslatedTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetPathTranslatedTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetPathTranslatedTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed to retrieve Translated Path";
  		String status = "false";
  
  		//checking for a not null value
  
  		if(request.getPathTranslated()!=null) {
  
  			status="true";
  			msg="OK";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetQueryStringTestServlet.java
  
  Index: GetQueryStringTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetQueryStringTestServlet.java,v 1.1 1999/11/09 01:36:11 vanitha Exp $
   * $Date: 1999/11/09 01:36:11 $
   *
   * 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_http.HttpServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Negative Test for getQueryString method
   */
  
  
  public class GetQueryStringTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetQueryStringTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetQueryStringTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "failed to retieve the query string";
  		String status = "false";
  
  		//we should get a not null value
  
  		if(request.getQueryString() !=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetQueryString_01TestServlet.java
  
  Index: GetQueryString_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetQueryString_01TestServlet.java,v 1.1 1999/11/09 01:36:14 vanitha Exp $
   * $Date: 1999/11/09 01:36:14 $
   *
   * 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_http.HttpServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for getQueryString method
   */
  
  
  public class GetQueryString_01TestServlet extends ServletTest {
  
  /**
   *	We did not supplied some queryString in the client
   *	We should get null here
   */
  
  	public String getTitle() {
  
  		return "GetQueryString_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetQueryString_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "retieved spurious query string";
  		String status = "false";
  
  		if(request.getQueryString() ==null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetRemoteUserTestServlet.java
  
  Index: GetRemoteUserTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetRemoteUserTestServlet.java,v 1.1 1999/11/09 01:36:16 vanitha Exp $
   * $Date: 1999/11/09 01:36:16 $
   *
   * 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_http.HttpServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getRemoteUser method
   */
  
  
  public class GetRemoteUserTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetRemoteUserTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRemoteUserTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem getting RemoteUser";
  		String status = "false";
  
  		if(request.getRemoteUser()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  		else if(request.getHeader("From")!=null &&
  			request.getHeader("Authorization")!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetRequestURITestServlet.java
  
  Index: GetRequestURITestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetRequestURITestServlet.java,v 1.1 1999/11/09 01:36:18 vanitha Exp $
   * $Date: 1999/11/09 01:36:18 $
   *
   * 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_http.HttpServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getRequestURI method
   */
  
  
  public class GetRequestURITestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetRequestURITestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRequestURITestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "getRequestURI Returned Null";
  		String status = "false";
  
  		//not null value expected
  
  		if(request.getRequestURI()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetRequestedSessionIdTestServlet.java
  
  Index: GetRequestedSessionIdTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetRequestedSessionIdTestServlet.java,v 1.1 1999/11/09 01:36:20 vanitha Exp $
   * $Date: 1999/11/09 01:36:20 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getRequestedSessionId method
   */
  
  public class GetRequestedSessionIdTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetRequestedSessionIdTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetRequestedSessionIdTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "getRequestedSession returned wrong value";
  		String status = "false";
  
  
  		//this is a new session
  		//so we should get null
  
  		if(request.getRequestedSessionId()==null) {
  
  			msg="OK";
  			status="true";
  
  		}
  
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetServletPathTestServlet.java
  
  Index: GetServletPathTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetServletPathTestServlet.java,v 1.1 1999/11/09 01:36:21 vanitha Exp $
   * $Date: 1999/11/09 01:36:21 $
   *
   * 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_http.HttpServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for getServletPath method
   */
  
  
  public class GetServletPathTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetServletPathTestServlet";
  	}
  
  	public String getDescription() {
  		return "GetServletPathTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "getServletPath didn\'t return path";
  		String status = "false";
  
  		//should get not null value
  
  		if(request.getServletPath()!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetSession_01TestServlet.java
  
  Index: GetSession_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetSession_01TestServlet.java,v 1.1 1999/11/09 01:36:24 vanitha Exp $
   * $Date: 1999/11/09 01:36:24 $
   *
   * 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_http.HttpServletRequest;
  
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for getSession method
   */
  
  
  public class GetSession_01TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "GetSession_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "GetSession_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "No session could be found ";
  		String status = "false";
  
  		if(request.getSession(true) instanceof HttpSession ) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetUserPrincipalTestServlet.java
  
  Index: GetUserPrincipalTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetUserPrincipalTestServlet.java,v 1.1 1999/11/09 01:36:31 vanitha Exp $
   * $Date: 1999/11/09 01:36:31 $
   *
   * 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_http.HttpServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import java.security.Principal;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for GetUserPrincipal() method
   */
  
  
  public class GetUserPrincipalTestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "GetUserPrincipalTestServlet";
  	}
  
  	public String getDescription() {
  
  		return "GetUserPrincipalTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem with GetUserPrincipal";
  		String status = "false";
  
  		Principal entity = request.getUserPrincipal();
  
  		if(entity!=null) {
  
  			msg="OK";
  			status="true";
  		}else if(request.getHeader("From")!=null && 
  			request.getHeader("Authorization")!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsRequestedSessionIdFromCookieTestServlet.java
  
  Index: IsRequestedSessionIdFromCookieTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsRequestedSessionIdFromCookieTestServlet.java,v 1.1 1999/11/09 01:36:38 vanitha Exp $
   * $Date: 1999/11/09 01:36:38 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for isRequestedSessionIdFromCookie method
   */
  
  public class IsRequestedSessionIdFromCookieTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "IsRequestedSessionIdFromCookieTestServlet";
  	}
  
  	public String getDescription() {
  		return "IsRequestedSessionIdFromCookieTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed didn\'t return proper value";
  		String status = "false";
  
  		/**   No Cookie Set in the Client side and no session is
  		**    Requested. therfore it should return false
  		**/
  
  		if(request.isRequestedSessionIdFromCookie()==false) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsRequestedSessionIdFromURLTestServlet.java
  
  Index: IsRequestedSessionIdFromURLTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsRequestedSessionIdFromURLTestServlet.java,v 1.1 1999/11/09 01:36:43 vanitha Exp $
   * $Date: 1999/11/09 01:36:43 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for isRequestedSessionIdFromURL method
   */
  
  
  public class IsRequestedSessionIdFromURLTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "IsRequestedSessionIdFromURLTestServlet";
  	}
  
  	public String getDescription() {
  		return "IsRequestedSessionIdFromURLTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed returned wrong value";
  		String status = "false";
  
  		//expected result is false
  
  		if(request.isRequestedSessionIdFromURL() ==false) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsRequestedSessionIdFromURL_2TestServlet.java
  
  Index: IsRequestedSessionIdFromURL_2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsRequestedSessionIdFromURL_2TestServlet.java,v 1.1 1999/11/09 01:36:46 vanitha Exp $
   * $Date: 1999/11/09 01:36:46 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for isRequestedSessionIdFromUrl method
   */
  
  
  public class IsRequestedSessionIdFromURL_2TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "IsRequestedSessionIdFromUrlTestServlet";
  	}
  
  	public String getDescription() {
  		return "IsRequestedSessionIdFromUrlTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed returned wrong value";
  		String status = "false";
  
  		//expected result is false
  
  		if(request.isRequestedSessionIdFromUrl() ==false) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsRequestedSessionIdValidTestServlet.java
  
  Index: IsRequestedSessionIdValidTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsRequestedSessionIdValidTestServlet.java,v 1.1 1999/11/09 01:36:48 vanitha Exp $
   * $Date: 1999/11/09 01:36:48 $
   *
   * 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_http.HttpServletRequest;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for isRequestedSessionIdValid method
   */
  
  
  public class IsRequestedSessionIdValidTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "IsRequestedSessionIdValidTestServlet";
  	}
  
  	public String getDescription() {
  		return "IsRequestedSessionIdValidTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Failed returned wrong value";
  		String status = "false";
  
  		//false is expected
  
  		if(request.isRequestedSessionIdValid()==false) {
  
  			status="true";
  			msg="OK";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsUserInRoleTestServlet.java
  
  Index: IsUserInRoleTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/IsUserInRoleTestServlet.java,v 1.1 1999/11/09 01:36:50 vanitha Exp $
   * $Date: 1999/11/09 01:36:50 $
   *
   * 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_http.HttpServletRequest;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import java.util.Enumeration;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for isUserInRole(String) method
   */
  
  
  public class IsUserInRoleTestServlet extends ServletTest {
  
  
  	public String getTitle() {
  
  		return "IsUserInRoleTestServlet";
  	}
  
  	public String getDescription() {
  		return "IsUserInRoleTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Problem with isUserInRole";
  		String status = "false";
  
  		if(request.isUserInRole("Analyst") == true ||
  		request.isUserInRole("Analyst")==false) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddCookieTestServlet.java
  
  Index: AddCookieTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddCookieTestServlet.java,v 1.1 1999/11/09 01:37:20 vanitha Exp $
   * $Date: 1999/11/09 01:37:20 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import javax.servlet.http.Cookie;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for addCookie(Cookie) method
   */
  
  public class AddCookieTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "AddCookieTestServlet";
  	}
  
  	public String getDescription() {
  		return "AddCookieTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  
  		//check for this in the client side
  
  		response.addCookie(new Cookie("testing","1"));
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddDateHeaderTestServlet.java
  
  Index: AddDateHeaderTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddDateHeaderTestServlet.java,v 1.1 1999/11/09 01:37:21 vanitha Exp $
   * $Date: 1999/11/09 01:37:21 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for addDateHeader(String,long) method
   */
  
  
  public class AddDateHeaderTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "AddDateHeaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "AddDateHeaderTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "";
  		String status = "true";
  
  		long date=9876543210L;
  		long date1=1234567890L;
  		response.setDateHeader("Set-Cookie",date);
  		response.addDateHeader("Set-Cookie",date1);
  
  		//we will check in the client side
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddDateHeader_1TestServlet.java
  
  Index: AddDateHeader_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddDateHeader_1TestServlet.java,v 1.1 1999/11/09 01:37:22 vanitha Exp $
   * $Date: 1999/11/09 01:37:22 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for addDateHeader(String,long) method
   */
  
  
  public class AddDateHeader_1TestServlet extends ServletTest {
  
  /**
   *	Tests this property of addHeader Method:
   *	If there is no header associated with the given name 
   *	addDateHeader(String,long) creates a new set
   */
  
  	public String getTitle() {
  
  		return "AddDateHeader_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "AddDateHeader_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "";
  		String status = "true";
  
  		long date=9876543210L;
  		response.addDateHeader("Set-Cookie",date);
  
  		//we will check in the client side
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddHeaderTestServlet.java
  
  Index: AddHeaderTestServlet.java
  ===================================================================
  
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddHeaderTestServlet.java,v 1.1 1999/11/09 01:37:23 vanitha Exp $
   * $Date: 1999/11/09 01:37:23 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for addHeader(String,Object) method
   */
  
  
  public class AddHeaderTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "AddHeaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "AddHeaderTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  
  		response.setHeader("Set-Cookie","Val=20");
  		response.addHeader("Set-Cookie","enus=engb");
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddHeader_1TestServlet.java
  
  Index: AddHeader_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddHeader_1TestServlet.java,v 1.1 1999/11/09 01:37:23 vanitha Exp $
   * $Date: 1999/11/09 01:37:23 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for addHeader(String,Object) method
   */
  
  
  public class AddHeader_1TestServlet extends ServletTest {
  
  /**
   *	Tests this property of addHeader Method:
   *	If there is no header associated with the given name 
   *	addHeader(String,Object) creates a new set
   */
  
  	public String getTitle() {
  
  		return "AddHeader_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "AddHeader_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  
  		//add a new Header
  		response.addHeader("Set-Cookie","enus=engb");
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddIntHeaderTestServlet.java
  
  Index: AddIntHeaderTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddIntHeaderTestServlet.java,v 1.1 1999/11/09 01:37:23 vanitha Exp $
   * $Date: 1999/11/09 01:37:23 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test For addIntHeader(String,int) method
   */
  
  public class AddIntHeaderTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "addIntHeaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "addIntHeaderTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "";
  		String status = "true";
  
  		response.setIntHeader("Set-Cookie",1);
  		response.addIntHeader("Set-Cookie",2);
  
  		// we will check in the client side
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddIntHeader_1TestServlet.java
  
  Index: AddIntHeader_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/AddIntHeader_1TestServlet.java,v 1.1 1999/11/09 01:37:25 vanitha Exp $
   * $Date: 1999/11/09 01:37:25 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test For addIntHeader(String,int) method
   *	@author Nikesh Anand
   */
  
  public class AddIntHeader_1TestServlet extends ServletTest {
  
  
  /**
   *	Tests this property of addHeader Method:
   *	If there is no header associated with the given name 
   *	addIntHeader(String,int) creates a new set
   */
  
  	public String getTitle() {
  
  		return "addIntHeader_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "addIntHeader_1TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "";
  		String status = "true";
  
  		//just add one header
  
  		response.addIntHeader("Set-Cookie",1);
  
  		// we will check in the client side
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/ContainsHeaderTestServlet.java
  
  Index: ContainsHeaderTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/ContainsHeaderTestServlet.java,v 1.1 1999/11/09 01:37:27 vanitha Exp $
   * $Date: 1999/11/09 01:37: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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for containsHeader method
   */
  
  
  public class ContainsHeaderTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "ContainsHeaderTestServlet";
  	}
  
  	public String getDescription() {
  		return "ContainsHeaderTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Failed returned wrong value";//oops no header
  		String status = "false";
  
  		response.setHeader("Cookie","Value=20");//set a Header
  
  		if(response.containsHeader("Cookie") ==true) { //Check it
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/ContainsHeader_01TestServlet.java
  
  Index: ContainsHeader_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/ContainsHeader_01TestServlet.java,v 1.1 1999/11/09 01:37:33 vanitha Exp $
   * $Date: 1999/11/09 01:37:33 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for containsHeader method
   */
  
  public class ContainsHeader_01TestServlet extends ServletTest {
  
  /** Without setting header we are invoking this method:expect false **/
  	public String getTitle() {
  
  		return "ContainsHeader_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "ContainsHeader_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Returned wrong value";//Header how could it be
  
  		String status = "false";
  
  		if(response.containsHeader("Cookie") !=true) { //Check it
  
  			msg="OK";
  			status="true"; // There was not any header
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/EncodeRedirectURLTestServlet.java
  
  Index: EncodeRedirectURLTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/EncodeRedirectURLTestServlet.java,v 1.1 1999/11/09 01:37:35 vanitha Exp $
   * $Date: 1999/11/09 01:37:35 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for encodeRedirectUrl(String) method
   */
  
  
  public class EncodeRedirectURLTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "EncodeRedirectURLTestServlet";
  	}
  
  	public String getDescription() {
  		return "EncodeRedirectURLTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Failed to encode the URL";
  		String status = "false";
  
  		StringBuffer sb = new StringBuffer();
  
  		sb.append(request.getScheme());
  		sb.append("://");
  		sb.append(request.getServerName());
  		sb.append("/");
  		sb.append(request.getServerPort());
  		sb.append("/");
  		sb.append(request.getServletPath());
  
  		String url = response.encodeRedirectURL(sb.toString());
  
  		if(url!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/EncodeRedirectURL_2TestServlet.java
  
  Index: EncodeRedirectURL_2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/EncodeRedirectURL_2TestServlet.java,v 1.1 1999/11/09 01:37:36 vanitha Exp $
   * $Date: 1999/11/09 01:37:36 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  
  /**
   *	A Test for encodeRedirectUrl(String) method
   */
  
  
  public class EncodeRedirectURL_2TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "EncodeRedirectUrlTestServlet";
  	}
  
  	public String getDescription() {
  		return "EncodeRedirectUrlTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "Failed to encode thr Url";
  		String status = "false";
  
  		StringBuffer sb = new StringBuffer();
  
  		sb.append(request.getScheme());
  		sb.append("://");
  		sb.append(request.getServerName());
  		sb.append("/");
  		sb.append(request.getServerPort());
  		sb.append("/");
  		sb.append(request.getServletPath());
  
  		String url = response.encodeRedirectUrl(sb.toString());
  
  		if(url!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/EncodeURLTestServlet.java
  
  Index: EncodeURLTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/EncodeURLTestServlet.java,v 1.1 1999/11/09 01:37:37 vanitha Exp $
   * $Date: 1999/11/09 01:37:37 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for encodeURL(String) method
   */
  
  
  public class EncodeURLTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "EncodeURLTestServlet";
  	}
  
  	public String getDescription() {
  
  		return "EncodeURLTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed: retured null";
  		String status = "false";
  
  		StringBuffer sb = new StringBuffer();
  
  		sb.append(request.getScheme());
  		sb.append("://");
  		sb.append(request.getServerName());
  		sb.append("/");
  		sb.append(request.getServerPort());
  		sb.append("/");
  		sb.append(request.getServletPath());
  
  		if(response.encodeURL(sb.toString())!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/EncodeURL_2TestServlet.java
  
  Index: EncodeURL_2TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/EncodeURL_2TestServlet.java,v 1.1 1999/11/09 01:37:39 vanitha Exp $
   * $Date: 1999/11/09 01:37:39 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for encodeUrl(String) method
   */
  
  
  public class EncodeURL_2TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "EncodeUrlTestServlet";
  	}
  
  	public String getDescription() {
  
  		return "EncodeUrlTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "Failed: retured null";
  		String status = "false";
  
  		StringBuffer sb = new StringBuffer();
  
  		sb.append(request.getScheme());
  		sb.append("://");
  		sb.append(request.getServerName());
  		sb.append("/");
  		sb.append(request.getServerPort());
  		sb.append("/");
  		sb.append(request.getServletPath());
  
  		if(response.encodeUrl(sb.toString())!=null) {
  
  			msg="OK";
  			status="true";
  		}
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/RedirectedTestServlet.java
  
  Index: RedirectedTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/RedirectedTestServlet.java,v 1.1 1999/11/09 01:37:40 vanitha Exp $
   * $Date: 1999/11/09 01:37:40 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	Helper class for sendRedirect method
   */
  
  
  public class RedirectedTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SendRedirectTestServlet";
  	}
  
  	public String getDescription() {
  		return "SendRedirectTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  
  		String msg = "OK";
  		String status = "true";
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendErrorTestServlet.java
  
  Index: SendErrorTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendErrorTestServlet.java,v 1.1 1999/11/09 01:37:44 vanitha Exp $
   * $Date: 1999/11/09 01:37:44 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for sendError(int) method
   */
  
  
  public class SendErrorTestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SendErrorTestServlet";
  	}
  
  	public String getDescription() {
  		return "SendErrorTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  
  		response.sendError(100);
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendError_01TestServlet.java
  
  Index: SendError_01TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendError_01TestServlet.java,v 1.1 1999/11/09 01:37:45 vanitha Exp $
   * $Date: 1999/11/09 01:37:45 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Test for sendError(int,String) method
   */
  
  
  public class SendError_01TestServlet extends ServletTest {
  
  	public String getTitle() {
  
  		return "SendError_01TestServlet";
  	}
  
  	public String getDescription() {
  		return "SendError_01TestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  		response.sendError(100,"OK");
  
  		props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirectTestServlet.java
  
  Index: SendRedirectTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirectTestServlet.java,v 1.1 1999/11/09 01:37:46 vanitha Exp $
   * $Date: 1999/11/09 01:37:46 $
   *
   * 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_http.HttpServletResponse;
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.net.InetAddress;
  
  /**
   *	A Test for sendRedirect method
   */
  
  
  public class SendRedirectTestServlet extends ServletTest {
  
  /* SendRedirect sends a temporary redirect esponseent
   * to the client using the specified new Location.
   */
  
  	/*
  	 *	The Title of the test
  	*/
  	public String getTitle() {
  
  		return "SendRedirectTestServlet";
  	}
  
  	/*
  	 *	A small description about the test
  	*/
  
  	public String getDescription() {
  		return "SendRedirectTestServlet";
  	}
  
  	public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = new Properties();
  		props.put(Constants.Response.Title, getTitle());
  		props.put(Constants.Response.Description,getDescription());
  		String msg = "";
  		String status = "true";
  
  		// Relative path of the new Location
  
  		String relPath="/servlet/tests.javax_servlet_http.";
  		String rp1="HttpServletResponse.RedirectedTestServlet";
  
  		relPath=relPath+rp1;
  
  
  		InetAddress inetAddr = InetAddress.getLocalHost();
  
  		String hostName=inetAddr.getHostName();
  
  		//Fully qualified Absolute path
  
  		String path="http://" +hostName+":"+
  				request.getServerPort() + relPath;
  
  		response.sendRedirect(path);
  
  	/*	props.put(Constants.Response.Status, status);
  		props.put(Constants.Response.Message, msg);*/
  		return props;
  	}
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirect_1TestServlet.java
  
  Index: SendRedirect_1TestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirect_1TestServlet.java,v 1.1 1999/11/09 01:37:46 vanitha Exp $
   * $Date: 1999/11/09 01:37:46 $
   *
   * 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_http.HttpServletResponse;
  
  
  import org.apache.tools.moo.servlet.ServletTest;
  import org.apache.tools.moo.servlet.Constants;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.ServletOutputStream;
  import javax.servlet.ServletConfig;
  import java.util.Properties;
  import javax.servlet.ServletException;
  import java.io.IOException;
  
  /**
   *	A Negative Test for sendRedirect method
   */
  
  
  public class SendRedirect_1TestServlet extends ServletTest {
  
  /**
   *	When sendRirect is called after committing the	
   *	the response,it will throw IllegalStateException.
   */
  
  	public String getTitle() {
  
  		return "SendRedirect_1TestServlet";
  	}
  
  	public String getDescription() {
  		return "SendRedirect_1TestServlet";
  	}
  
  	 //dummy
  
  	 public Properties doTest (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
  		Properties props = null;
  		return props;
  	}
  
  	public void service(HttpServletRequest request, HttpServletResponse response) {
  
  		Properties props = new Properties();
  
  		ServletOutputStream sos =null; 
  
  		try {
  
  			props.put(Constants.Response.Title, getTitle());
  			props.put(Constants.Response.Description,getDescription());
  			String msg="Failed to raise IllegalStateException";
  			String status="false";
  
  			sos = response.getOutputStream();
  			response.setBufferSize(60);
  
  			response.setContentType("text/html");
  
  			//this commits the response
  
  			response.flushBuffer();
  			sos.println("Good Luck");
  			sos.flush();
  
  			try {
  
  				String relativePath="/servlet/tests.javax_servlet_http.HttpServletResponse.SendRedirect_1TestServlet";
  				response.sendRedirect(relativePath);
  
  			}catch(IllegalStateException ise) {
  
  				System.out.println("Iam Here");
  				msg="OK";
  				status="true";
  			}
  
  			props.put(Constants.Response.Status,status);
  			props.put(Constants.Response.Message,msg);
  
  		}catch (IOException ioe) {
  
  			props.put(Constants.Response.Exception,
  			ioe.getMessage());
  		} catch (RuntimeException e) { //servlet crash?
  
  			props.put(Constants.Response.Exception,e.getMessage());
  		}catch(Exception e) {
  
  			//Unknow Exception
  			props.put(Constants.Response.Exception,e.getMessage());
  		}
  
  		props.put(Constants.Response.TestClass,this.getClass().getName());
  
  		props.save(sos, this.getClass().getName());	 
  	}	
  }
  
  
  
  1.1                  jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SetDateHeaderTestServlet.java
  
  Index: SetDateHeaderTestServlet.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SetDateHeaderTestServlet.java,v 1.1 1999/11/09 01:37:46 vanitha Exp $
   * $Date: 1999/11/09 01:37:46 $
   *
   * 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
   *    Found