vmassol 01/04/22 05:59:15
Modified: cactus/docs/framework/xdocs sample_servlet.xml
Log:
improved comments to explain better where to find additional information about
servlet testing
Revision Changes Path
1.3 +34 -4 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sample_servlet.xml 2001/04/09 12:12:50 1.2
+++ sample_servlet.xml 2001/04/22 12:59:14 1.3
@@ -12,16 +12,46 @@
<body>
- <s1 title="Servlet Sample Application">
+ <s1 title="Forewords">
<p>
- Cactus provides a
+ As part of its distribution, Cactus provides a
<link href="downloads.html">sample application</link> that
shows how to write test cases for unit testing servlet methods. You
should have a look at this sample application as it gives thorough
- example. However, this section only focuses on explaining the principle
- by showing a very simple example.
+ examples. The examples will show you :
</p>
+ <ul>
+ <li>
+ How to test a method that calls <code>getServletContext()</code>,
+ <code>getServletConfig()</code>, <code>log()</code>, ... (actually
+ any method inherited from <code>GenericServlet</code>),
+ </li>
+ <li>
+ How to test returned cookies, returned headers,
+ </li>
+ <li>
+ ...
+ </li>
+
+ </ul>
+
+ <note>
+ The
+ <link
href="http://jakarta.apache.org:8080/jyve-faq/Turbine/screen/DisplayTopics/action/SetAll/project_id/2/faq_id/39">
+ FAQ</link> pages will also show common problems and solutions.
+ </note>
+
+ <p>
+ This section only focuses on explaining the principle of Cactus unit
+ testing by showing how to write a servlet test case on a very simple
+ example.
+ </p>
+
+ </s1>
+
+ <s1 title="Simple Servlet Sample">
+
<p>
For the sake of simplicity let's imagine we have a servlet called
<code>SimpleServlet</code> which has a single method :