jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest ServletRequestSetCharacterEncoding_1TestServlet.java
Date Fri, 22 Dec 2000 18:59:17 GMT
craigmcc    00/12/22 10:59:17

  Modified:    src/conf servlet-gtest.xml
               src/server/servlet-tests/WEB-INF web.xml
  Added:       src/clients/org/apache/jcheck/servlet/client/javax_servlet/ServletRequest
                        ServletRequestSetCharacterEncoding_1Test.html
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest
                        ServletRequestSetCharacterEncoding_1TestServlet.java
  Log:
  Add missing test ServletRequestSetCharacterEncoding_1Test.
  
  Revision  Changes    Path
  1.1                  jakarta-watchdog-4.0/src/clients/org/apache/jcheck/servlet/client/javax_servlet/ServletRequest/ServletRequestSetCharacterEncoding_1Test.html
  
  Index: ServletRequestSetCharacterEncoding_1Test.html
  ===================================================================
  ServletRequestSetCharacterEncoding_1Test test PASSED
  
  
  
  1.16      +4 -0      jakarta-watchdog-4.0/src/conf/servlet-gtest.xml
  
  Index: servlet-gtest.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/conf/servlet-gtest.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- servlet-gtest.xml	2000/12/18 00:09:59	1.15
  +++ servlet-gtest.xml	2000/12/22 18:59:13	1.16
  @@ -514,6 +514,10 @@
              debug="0" host="${host}" port="${port}"
              goldenFile="${wgdir}/javax_servlet/ServletRequest/ServletRequestSetAttributeTest.html"
/>
   
  +      <gtest request="GET /servlet-tests/ServletRequestSetCharacterEncoding_1Test HTTP/1.0"
  +           debug="0" host="${host}" port="${port}"
  +           goldenFile="${wgdir}/javax_servlet/ServletRequest/ServletRequestSetCharacterEncoding_1Test.html"
/>
  +
   
     <!-- javax_servlet_ServletResponse tests -->
   
  
  
  
  1.3       +17 -0     jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/web.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- web.xml	2000/11/06 21:31:23	1.2
  +++ web.xml	2000/12/22 18:59:14	1.3
  @@ -1204,6 +1204,14 @@
   	</servlet>
   	<servlet>
   		<servlet-name>
  +			ServletRequestSetCharacterEncoding_1Test
  +		</servlet-name>
  +		<servlet-class>
  +			tests.javax_servlet.ServletRequest.ServletRequestSetCharacterEncoding_1TestServlet
  +		</servlet-class>
  +	</servlet>
  +	<servlet>
  +		<servlet-name>
   			ServletRequestGetAttributeTest
   		</servlet-name>
   		<servlet-class>
  @@ -3208,6 +3216,15 @@
   			/ServletRequestSetAttributeTest
   		</url-pattern>
   
  +	</servlet-mapping>
  +
  +	<servlet-mapping>
  +		<servlet-name>
  +			ServletRequestSetCharacterEncoding_1Test
  +		</servlet-name>
  +		<url-pattern>
  +			/ServletRequestSetCharacterEncoding_1Test
  +		</url-pattern>
   	</servlet-mapping>
   
   	<servlet-mapping>
  
  
  
  1.1                  jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletRequest/ServletRequestSetCharacterEncoding_1TestServlet.java
  
  Index: ServletRequestSetCharacterEncoding_1TestServlet.java
  ===================================================================
  /*
   *
   * %W%   %G%
   *
   *
   * 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 javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;
  import javax.servlet.GenericServlet;
  import javax.servlet.ServletConfig;
  import javax.servlet.ServletException;
  import java.io.IOException;
  import java.io.PrintWriter;
  import java.io.UnsupportedEncodingException;
  
  
  
  public class ServletRequestSetCharacterEncoding_1TestServlet extends GenericServlet {
  
  	public void service (ServletRequest request, ServletResponse response) throws ServletException,
IOException {
  
  		PrintWriter out = response.getWriter();
  		// getting char encoding
  		try {
  			request.setCharacterEncoding("illegal_encoding");
  			out.println("ServletRequestSetCharacterEncoding_1Test test FAILED <BR>");
  			out.println("     The exception UnsupportedEncodingException should have been thrown<BR>");
  		}
  		catch (UnsupportedEncodingException usee) {
  			out.println("ServletRequestSetCharacterEncoding_1Test test PASSED");
  		}
  	}
  }
  
  
  

Mime
View raw message