vmassol 01/06/10 10:29:32
Modified: cactus/docs/framework/xdocs sample_servlet.xml
Log:
Corrected bugs in the sample (thanks to Russ Baker)
Revision Changes Path
1.5 +11 -2 jakarta-commons/cactus/docs/framework/xdocs/sample_servlet.xml
Index: sample_servlet.xml
===================================================================
RCS file: /home/cvs/jakarta-commons/cactus/docs/framework/xdocs/sample_servlet.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sample_servlet.xml 2001/05/05 14:34:43 1.4
+++ sample_servlet.xml 2001/06/10 17:29:32 1.5
@@ -191,9 +191,18 @@
}
/**
+ * Sets the HTTP request parameter that will be available in the test
+ * method.
+ */
+ public void beginDoGet(ServletTestRequest theRequest)
+ {
+ theRequest.addParameter("USER_NAME", "Vincent");
+ }
+
+ /**
* Test the output stream returned by the <code>doGet()</code> method.
*/
- public void testDoGet()
+ public void testDoGet() throws IOException
{
SimpleServlet servlet = new SimpleServlet();
servlet.doGet(request, response);
@@ -202,7 +211,7 @@
/**
* Test the output stream returned by the <code>doGet()</code> method.
*/
- public void endDoGet(HttpURLConnection theConnection)
+ public void endDoGet(HttpURLConnection theConnection) throws IOException
{
assertEquals("<html><head/><body><h1>Your name is
Vincent</h1></body></html>",
AssertUtils.getResponseAsString(theConnection));