Package org.apache.cactus.configuration

Examples of org.apache.cactus.configuration.ServletConfiguration


    /**
     * Verify that we can retrieve several POST parameters.
     */
    public void testGetPostParametersSeveral()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addParameter("param1", "value1", WebRequest.POST_METHOD);
        request.addParameter("param2", "value2", WebRequest.POST_METHOD);
        request.addParameter("param3", "value3", WebRequest.POST_METHOD);

View Full Code Here


        // in its classpath (using the same mechanism as the Ant project is
        // using to conditionally compile tasks).

        // Create configuration objects
        BaseConfiguration baseConfig = new BaseConfiguration();
        ServletConfiguration servletConfig = new ServletConfiguration();
        FilterConfiguration filterConfig = new FilterConfiguration();

        // Create a Jetty Server object and configure a listener
        this.server = createServer(baseConfig);
View Full Code Here

     * @param theTest a pure JUnit Test that Cactus will wrap
     */
    void init(Test theTest)
    {
        setClientDelegate(new WebClientTestCaseDelegate(
            this, theTest, new ServletConfiguration()));       
        setServerDelegate(new ServerTestCaseDelegate(this, theTest));
    }
View Full Code Here

        // in its classpath (using the same mechanism as the Ant project is
        // using to conditionally compile tasks).

        // Create configuration objects
        BaseConfiguration baseConfig = new BaseConfiguration();
        ServletConfiguration servletConfig = new ServletConfiguration();
        FilterConfiguration filterConfig = new FilterConfiguration();

        // Create a Jetty Server object and configure a listener
        Object server = createServer(baseConfig);
View Full Code Here

     * @see AbstractTestCase#runTest()
     */
    protected void runTest() throws Throwable
    {
        WebClientTestCaseDelegate delegator = new WebClientTestCaseDelegate(
            this, this, new ServletConfiguration());       

        try
        {
            // Call the begin method
            WebRequest request = new WebRequest(
View Full Code Here

     * Verify that an exception is thrown when an invalid HTTP METHOD is used
     * when adding an HTTP parameter.
     */
    public void testAddParameterInvalidMethod()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        try
        {
            request.addParameter("param1", "value1", "INVALIDMETHOD");
            fail("Should have thrown an exception");
View Full Code Here

     * Verify that <code>getParameterGet</code> returns the first parameter
     * that was added to the request.
     */
    public void testGetParametersGetOk()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addParameter("param1", "value1", WebRequest.GET_METHOD);
        request.addParameter("param1", "value2", WebRequest.GET_METHOD);

        String result = request.getParameterGet("param1");
View Full Code Here

     * Verify that <code>getParameterGet</code> returns null if no parameter
     * of a given name was added to the request.
     */
    public void testGetParameterGetNull()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addParameter("param1", "value1", WebRequest.POST_METHOD);

        String result = request.getParameterGet("param1");

View Full Code Here

     * Verify that <code>getParameterPost</code> returns the first parameter
     * that was added to the request.
     */
    public void testGetParametersPostOk()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addParameter("param1", "value1", WebRequest.POST_METHOD);
        request.addParameter("param1", "value2", WebRequest.POST_METHOD);

        String result = request.getParameterPost("param1");
View Full Code Here

     * Verify that <code>getParameterPost</code> returns null if no parameter
     * of a given name was added to the request.
     */
    public void testGetParameterPostNull()
    {
        WebRequest request = new WebRequest(new ServletConfiguration());

        request.addParameter("param1", "value1", WebRequest.GET_METHOD);

        String result = request.getParameterPost("param1");

View Full Code Here

TOP

Related Classes of org.apache.cactus.configuration.ServletConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.