jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morg...@apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse SendRedirectForWebAppTestServlet.java SendRedirectIgnoreHeaderTestServlet.java SendRedirectTestServlet.java SendRedirect_1TestServlet.java
Date Thu, 25 Jul 2002 18:54:43 GMT
morgand     2002/07/25 11:54:43

  Modified:    latka-scratch/src/distribution/tests servlet-tests.web.xml
               latka-scratch/src/distribution/tests/servlet-tests/tests/javax_servlet_http/HttpServletResponse
                        tests.mod
               src/server/servlet-tests/WEB-INF web.xml
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse
                        SendRedirectForWebAppTestServlet.java
                        SendRedirectIgnoreHeaderTestServlet.java
                        SendRedirectTestServlet.java
                        SendRedirect_1TestServlet.java
  Log:
  moved  redirect URI from hardcoded value to servlet init param
  
  Revision  Changes    Path
  1.9       +21 -1     jakarta-watchdog-4.0/latka-scratch/src/distribution/tests/servlet-tests.web.xml
  
  Index: servlet-tests.web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/latka-scratch/src/distribution/tests/servlet-tests.web.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- servlet-tests.web.xml	25 Jul 2002 18:26:12 -0000	1.8
  +++ servlet-tests.web.xml	25 Jul 2002 18:54:42 -0000	1.9
  @@ -4464,6 +4464,11 @@
       
       <servlet-class>tests.javax_servlet_http.HttpServletResponse.SendRedirectTestServlet</servlet-class>
       
  +    <init-param>
  +      <param-name>redirectPath</param-name>
  +      <param-value>/RedirectedTest</param-value>
  +    </init-param>
  +    
       <load-on-startup>0</load-on-startup>
       
     
  @@ -4477,6 +4482,11 @@
       
       <servlet-class>tests.javax_servlet_http.HttpServletResponse.SendRedirectIgnoreHeaderTestServlet</servlet-class>
       
  +    <init-param>
  +      <param-name>redirectPath</param-name>
  +      <param-value>RedirectedTestServlet</param-value>
  +    </init-param>
  +    
       <load-on-startup>0</load-on-startup>
       
     
  @@ -4606,7 +4616,12 @@
       <display-name>SendRedirect_1Test</display-name>
       
       <servlet-class>tests.javax_servlet_http.HttpServletResponse.SendRedirect_1TestServlet</servlet-class>
  -    
  +
  +    <init-param>
  +      <param-name>redirectPath</param-name>
  +      <param-value>/RedirectedTest</param-value>
  +    </init-param>    
  +     
       <load-on-startup>0</load-on-startup>
       
     
  @@ -4619,6 +4634,11 @@
       <display-name>SendRedirectForWebAppTest</display-name>
       
       <servlet-class>tests.javax_servlet_http.HttpServletResponse.SendRedirectForWebAppTestServlet</servlet-class>
  +    
  +    <init-param>
  +      <param-name>redirectPath</param-name>
  +      <param-value>RedirectedTestServlet</param-value>
  +    </init-param>
       
       <load-on-startup>0</load-on-startup>
       
  
  
  
  1.2       +1 -1      jakarta-watchdog-4.0/latka-scratch/src/distribution/tests/servlet-tests/tests/javax_servlet_http/HttpServletResponse/tests.mod
  
  Index: tests.mod
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/latka-scratch/src/distribution/tests/servlet-tests/tests/javax_servlet_http/HttpServletResponse/tests.mod,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tests.mod	23 Jul 2002 20:14:11 -0000	1.1
  +++ tests.mod	25 Jul 2002 18:54:43 -0000	1.2
  @@ -88,7 +88,7 @@
     <validate>
       <!--TEST STRATEGY: A test for HttpServletResponse.sendRedirect() method.-->
       <statusCode code="302" label="Sends a temporary redirect response to the client
using the specified redirect location URL that is based on the context-root,specified in the
Java Servlet Pages Specification v2.3, Sec 14" />
  -    <responseHeader headerName="Location" headerValue="http://${host}:${port}/servlet-tests/RedirectedTest"
label="Sends a temporary redirect response to the client using the specified redirect location
URL that is based on the context-root,specified in the Java Servlet Pages Specification v2.3,
Sec 14" />
  +    <responseHeader headerName="Location" headerValue="http://${host}:${port}/servlet-tests/tests/javax_servlet_http/HttpServletResponse/RedirectedTestServlet"
label="Sends a temporary redirect response to the client using the specified redirect location
URL that is based on the context-root,specified in the Java Servlet Pages Specification v2.3,
Sec 14" />
     </validate>
   </request>
   
  
  
  
  1.18      +16 -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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- web.xml	25 Jul 2002 18:26:12 -0000	1.17
  +++ web.xml	25 Jul 2002 18:54:43 -0000	1.18
  @@ -2125,12 +2125,20 @@
       <servlet-name>SendRedirectTest</servlet-name>
       <display-name>SendRedirectTest</display-name>
       <servlet-class>tests.javax_servlet_http.HttpServletResponse.SendRedirectTestServlet</servlet-class>
  +    <init-param>
  +      <param-name>redirectPath</param-name>
  +      <param-value>/RedirectedTest</param-value>
  +    </init-param>
       <load-on-startup>0</load-on-startup>
     </servlet>
     <servlet>
       <servlet-name>SendRedirectIgnoreHeaderTest</servlet-name>
       <display-name>SendRedirectIgnoreHeaderTest</display-name>
       <servlet-class>tests.javax_servlet_http.HttpServletResponse.SendRedirectIgnoreHeaderTestServlet</servlet-class>
  +    <init-param>
  +      <param-name>redirectPath</param-name>
  +      <param-value>RedirectedTest</param-value>
  +    </init-param>
       <load-on-startup>0</load-on-startup>
     </servlet>
     <servlet>
  @@ -2191,12 +2199,20 @@
       <servlet-name>SendRedirect_1Test</servlet-name>
       <display-name>SendRedirect_1Test</display-name>
       <servlet-class>tests.javax_servlet_http.HttpServletResponse.SendRedirect_1TestServlet</servlet-class>
  +    <init-param>
  +      <param-name>redirectPath</param-name>
  +      <param-value>/RedirectedTest</param-value>
  +    </init-param>
       <load-on-startup>0</load-on-startup>
     </servlet>
     <servlet>
       <servlet-name>SendRedirectForWebAppTest</servlet-name>
       <display-name>SendRedirectForWebAppTest</display-name>
       <servlet-class>tests.javax_servlet_http.HttpServletResponse.SendRedirectForWebAppTestServlet</servlet-class>
  +    <init-param>
  +      <param-name>redirectPath</param-name>
  +      <param-value>RedirectedTest</param-value>
  +    </init-param>
       <load-on-startup>0</load-on-startup>
     </servlet>
     <servlet>
  
  
  
  1.2       +4 -4      jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirectForWebAppTestServlet.java
  
  Index: SendRedirectForWebAppTestServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirectForWebAppTestServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SendRedirectForWebAppTestServlet.java	11 Jan 2002 22:37:08 -0000	1.1
  +++ SendRedirectForWebAppTestServlet.java	25 Jul 2002 18:54:43 -0000	1.2
  @@ -80,7 +80,7 @@
   
           // Relative path of the new Location
   
  -        String path = "RedirectedTest";
  +        String path = getServletConfig().getInitParameter("redirectPath");
           response.sendRedirect( path );
       }
   }
  
  
  
  1.2       +4 -4      jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirectIgnoreHeaderTestServlet.java
  
  Index: SendRedirectIgnoreHeaderTestServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirectIgnoreHeaderTestServlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SendRedirectIgnoreHeaderTestServlet.java	11 Jan 2002 22:37:08 -0000	1.1
  +++ SendRedirectIgnoreHeaderTestServlet.java	25 Jul 2002 18:54:43 -0000	1.2
  @@ -80,7 +80,7 @@
   
           // Relative path of the new Location
   
  -        String path = "/RedirectedTest";
  +        String path = getServletConfig().getInitParameter("redirectPath");
           response.sendRedirect( path );
           response.addHeader( "HttpServletResponse", "sendRedirectIgnoreHeader" );
       }
  
  
  
  1.5       +4 -4      jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirectTestServlet.java
  
  Index: SendRedirectTestServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirectTestServlet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SendRedirectTestServlet.java	11 Jan 2002 22:29:18 -0000	1.4
  +++ SendRedirectTestServlet.java	25 Jul 2002 18:54:43 -0000	1.5
  @@ -80,7 +80,7 @@
   
           // Relative path of the new Location
   
  -        String path = "/RedirectedTest";
  +        String path = getServletConfig().getInitParameter("redirectPath");
           response.sendRedirect( path );
       }
   }
  
  
  
  1.5       +4 -4      jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirect_1TestServlet.java
  
  Index: SendRedirect_1TestServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse/SendRedirect_1TestServlet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SendRedirect_1TestServlet.java	11 Jan 2002 22:29:18 -0000	1.4
  +++ SendRedirect_1TestServlet.java	25 Jul 2002 18:54:43 -0000	1.5
  @@ -85,7 +85,7 @@
           response.flushBuffer();
   
           try {
  -            response.sendRedirect( "/RedirectedTest" );
  +            response.sendRedirect( getServletConfig().getInitParameter("redirectPath")
);
               out.println( "SendRedirect_1Test test FAILED<BR>" );
               out.println( "     IllegalStateException exception should have been thrown<BR>"
);
           } catch ( IllegalStateException ise ) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:watchdog-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:watchdog-dev-help@jakarta.apache.org>


Mime
View raw message