larryi 02/04/26 18:44:11
Modified: src/tests/webpages/WEB-INF test-tomcat.xml
Added: src/tests/webpages/dispatch foo.jsp rdForward.jsp
rdInclude.jsp
Log:
Add test case for Bugzilla 8092. RequestDispatcher.include followed by
a RequestDispacher.forward to a static page. Also added one that forwards
to a JSP page.
Reported by: Andreas.Junghans
Revision Changes Path
1.53 +15 -1 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.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- test-tomcat.xml 18 Apr 2002 13:58:01 -0000 1.52
+++ test-tomcat.xml 27 Apr 2002 01:44:11 -0000 1.53
@@ -16,7 +16,7 @@
early tests.
-->
- <property name="revision" value="$Revision: 1.52 $" />
+ <property name="revision" value="$Revision: 1.53 $" />
<property name="host" value="127.0.0.1" />
<property name="port" value="8080" />
<property name="colonPort" value=":${port}" />
@@ -549,6 +549,20 @@
<httpRequest path="/test/servlet/dispatch.IncludeJspWithTaglib" />
<httpStatusMatch match="200" />
<responseMatch match="This is a taglib test"/>
+ </httpClient>
+
+ <httpClient>
+ <comment>RequestDispatcher.include to JSP which RequestDispatcher.forward
to a static page</comment>
+ <httpRequest path="/test/dispatch/rdInclude.jsp" />
+ <httpStatusMatch match="200" />
+ <responseMatch match="FOO"/>
+ </httpClient>
+
+ <httpClient>
+ <comment>RequestDispatcher.include to JSP which RequestDispatcher.forward
to a JSP page</comment>
+ <httpRequest path="/test/dispatch/rdInclude.jsp?type=jsp" />
+ <httpStatusMatch match="200" />
+ <responseMatch match="JSPFOO"/>
</httpClient>
</target>
1.1 jakarta-tomcat/src/tests/webpages/dispatch/foo.jsp
Index: foo.jsp
===================================================================
<% String txt="FOO"; %>
JSP<%= txt %>
1.1 jakarta-tomcat/src/tests/webpages/dispatch/rdForward.jsp
Index: rdForward.jsp
===================================================================
<%
String type = request.getParameter("type");
String pg = "foo.html";
if ("jsp".equals(type))
pg = "foo.jsp";
RequestDispatcher rd = application.getRequestDispatcher(
"/dispatch/" + pg);
if (null != rd)
rd.forward(request, response);
else
response.sendError(HttpServletResponse.SC_NOT_FOUND,
"/dispatch/" + pg + " not found.");
%>
1.1 jakarta-tomcat/src/tests/webpages/dispatch/rdInclude.jsp
Index: rdInclude.jsp
===================================================================
<%
RequestDispatcher rd = application.getRequestDispatcher(
"/dispatch/rdForward.jsp");
if (null != rd)
rd.include(request, response);
else
response.sendError(HttpServletResponse.SC_NOT_FOUND,
"/dispatch/rdForward.jsp not found.");
%>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>