costin 01/02/10 13:25:29 Modified: src/tests/webpages/WEB-INF test-tomcat.xml Added: src/tests/webpages/WEB-INF/classes/params RDIncludeParam.java Log: Another test: POST with a request dispatcher, the params are first read in the included servlet. Revision Changes Path 1.18 +48 -2 jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml Index: test-tomcat.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- test-tomcat.xml 2001/02/10 21:17:08 1.17 +++ test-tomcat.xml 2001/02/10 21:25:28 1.18 @@ -16,7 +16,7 @@ early tests. --> - <property name="revision" value="$Revision: 1.17 $" /> + <property name="revision" value="$Revision: 1.18 $" /> <property name="host" value="127.0.0.1" /> <property name="port" value="8080" /> <property name="outputType" value="text" /> @@ -171,7 +171,7 @@ <comment>Ordering in RequestDispatcher.include</comment> <httpRequest path="/test/servlet/params.RDInclude" - method="POST"> + method="GET"> <param name="a" value="k" type="GET" /> <param name="c" value="l" type="GET"/> <param name="a" value="m" type="GET"/> @@ -186,6 +186,52 @@ <responseMatch match="postInclude1:c = [ l ]" /> <responseMatch match="Calling RD.include for: params.Params/include2?a=c&d=e"/> + <responseMatch match="/include2:a = [ c , k , m ]" /> + <responseMatch match="/include2:d = [ e ]" /> + <responseMatch match="/include2:c = [ l ]" /> + <responseMatch match="postInclude2:a = [ k , m ]" /> + <responseMatch match="postInclude2:c = [ l ]" /> + </httpClient> + + <httpClient> + <comment>Ordering in RequestDispatcher.include, POST</comment> + <httpRequest + path="/test/servlet/params.RDInclude" + method="POST"> + <param name="a" value="k" type="GET" /> + <param name="c" value="l" type="GET"/> + <param name="a" value="m" type="POST"/> + </httpRequest> + <responseMatch match="before:a = [ k , m ]" /> + <responseMatch match="before:c = [ l ]" /> + <responseMatch + match="Calling RD.include for: params.Params/include1?a=b"/> + <responseMatch match="/include1:a = [ b , k , m ]" /> + <responseMatch match="/include1:c = [ l ]" /> + <responseMatch match="postInclude1:a = [ k , m ]" /> + <responseMatch match="postInclude1:c = [ l ]" /> + <responseMatch + match="Calling RD.include for: params.Params/include2?a=c&d=e"/> + <responseMatch match="/include2:a = [ c , k , m ]" /> + <responseMatch match="/include2:d = [ e ]" /> + <responseMatch match="/include2:c = [ l ]" /> + <responseMatch match="postInclude2:a = [ k , m ]" /> + <responseMatch match="postInclude2:c = [ l ]" /> + </httpClient> + + <httpClient> + <comment>RequestDispatcher - POST, include, params </comment> + <httpRequest + path="/test/servlet/params.RDIncludeParam" + method="POST"> + <param name="a" value="k" type="GET" /> + <param name="c" value="l" type="GET"/> + <param name="a" value="m" type="POST"/> + </httpRequest> + <responseMatch match="/include1:a = [ b , k , m ]" /> + <responseMatch match="/include1:c = [ l ]" /> + <responseMatch match="postInclude1:a = [ k , m ]" /> + <responseMatch match="postInclude1:c = [ l ]" /> <responseMatch match="/include2:a = [ c , k , m ]" /> <responseMatch match="/include2:d = [ e ]" /> <responseMatch match="/include2:c = [ l ]" /> 1.1 jakarta-tomcat/src/tests/webpages/WEB-INF/classes/params/RDIncludeParam.java Index: RDIncludeParam.java =================================================================== package params; import java.io.*; import java.text.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; /** * */ public class RDIncludeParam extends HttpServlet { public void service(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/plain"); PrintWriter out = response.getWriter(); // Don't call getParameters ! String uri="params.Params/include1?a=b"; out.println("Calling RD.include for: " + uri); RequestDispatcher rd=request.getRequestDispatcher(uri); rd.include( request, response ); ServletUtil.printParamValues( "", " ]", "postInclude1:", " = [ ", "", "", " , ", request, out ); uri="params.Params/include2?a=c&d=e"; out.println("Calling RD.include for: " + uri); rd=request.getRequestDispatcher(uri); rd.include( request, response ); ServletUtil.printParamValues( "", " ]", "postInclude2:", " = [ ", "", "", " , ", request, out ); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]