| Home >> All >> org >> apache >> cactus >> sample >> [ servlet Javadoc ] |
| | org.apache.cactus.sample.servlet.unit.* (27) | | org.apache.cactus.sample.servlet.util.* (2) |
org.apache.cactus.sample.servlet: Javadoc index of package org.apache.cactus.sample.servlet.
Package Samples:
org.apache.cactus.sample.servlet.unit
org.apache.cactus.sample.servlet.util
Classes:
GenericResponseWrapper: Wrapper around a HttpServletResponse that we use to easily write filters that manipulate the output stream. Indeed, we cannot pass the output stream of our filter direectly to the next filter in the chain because then we won't be able to write to it (the response will have been committed). Instead, we pass this wrapper class and then copy its data to our filter output stream. Note: This code was adapted from the Filter tutorial found here
TestSetURLSpecific: Test the J2EE 1.3 specifics of the WebRequest.setURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) > WebRequest.setURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) 55 method (specifically verify calls to getRequestURL ).
TestClientServerSynchronization: Verify that the Cactus client side only reads the test result *after* the test is finished (ie after the test result has been saved in the application scope). This JUnit test need to be the first one to be run. Otherwise, the test result might be that of the previous test and not the current test one, thus proving nothing !!
FilterServletOutputStream: Helper class to help write filters that manipulates the output stream. This is because normally, the ServletOutputStream cannot be modified after a resource has committed it. Note: This code was adapted from the Filter tutorial found here
TestSetURL: Test the WebRequest.setURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) > WebRequest.setURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) 55 method.
TestSampleServletConfig: Tests of the SampleServletConfig servlet class. This to show how servlet methods that makes calls to getServletConfig() , getServletContext() , log() , ... (i.e. methods that have been inherited from GenericServlet ) can be unit-tested with Cactus.
TestServerSideExceptions: Verifies the correct handling of exceptions that happen when running inside the server. Specifically verifies that serializable, non-serializable and junit.framework.AssertionFailedError exceptions are correctly propagated to the client side.
TestJspTagLifecycle: Tests for the JspTagLifecycle extension. The lifecycle helper is tested here by testing the core tags of the reference implementation of the JSP standard tag library (JSTL), available at .
SampleServlet: Sample servlet that implement some very simple business logic. The goal is to provide functional tests for Cactus, so we focus on providing as many different test cases as possible rather than implementing a meaningful business logic.
SampleServletConfig: Sample servlet to show how to unit test a servlet that makes calls to getServletConfig() , getServletContext() , log() , ... (i.e. methods inherited from GenericServlet ).
SampleBodyTag: Sample tag that interacts with its body. The tag acts as a filter for its body. "Target" and "Replacement" Strings are defined by the tag's attributes and each "occurrence" of the target is replaced by the "replacement".
SampleFilter: Sample filter that implements some very simple business logic. The goal is to provide some functional tests for Cactus and examples for Cactus users. This filter simply adds a header and a footer to the returned HTML.
TestJUnitTestCaseWrapper: Pure JUnit Test Case that we run on the server side using Cactus, by using a org.apache.cactus.ServletTestSuite .
TestSetUpTearDown: Test that setUp() and tearDown() methods are called and can access implicit objects in ServletTestCase .
TestServletRedirectorOverride: Test that it is possible to override a servlet redirector as defined in cactus.properties on a per test case basis.
TestJspPageContext: Test the usage of the pageContext implicit object when using JspTestCase .
TestJspOut: Test the usage of the out implicit object when using JspTestCase .
TestTearDownException: Test that tearDown() is called even when an exception occurs during the test.
TestGlobalBeginEnd: Test global client side begin() and end() methods.
TestShareAll: Test suite containing all test cases that should be run on all J2EE APIs.
TestAll: Run all the Cactus unit tests related to Servlet API 2.2.
TestServletContext: Tests that exercise the Cactus Servlet Context wrapper.
TestSampleServlet: Tests of the SampleServlet servlet class.
TestServletConfig: Tests that exercise the Cactus Servlet Config wrapper.
| Home | Contact Us | Privacy Policy | Terms of Service |