Return-Path: Delivered-To: apmail-jakarta-watchdog-dev-archive@apache.org Received: (qmail 34857 invoked from network); 28 Jan 2002 23:42:30 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 28 Jan 2002 23:42:30 -0000 Received: (qmail 14545 invoked by uid 97); 28 Jan 2002 23:42:34 -0000 Delivered-To: qmlist-jakarta-archive-watchdog-dev@jakarta.apache.org Received: (qmail 14431 invoked by uid 97); 28 Jan 2002 23:42:33 -0000 Mailing-List: contact watchdog-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Watchdog Developers List" Reply-To: "Watchdog Developers List" Delivered-To: mailing list watchdog-dev@jakarta.apache.org Received: (qmail 14420 invoked by uid 97); 28 Jan 2002 23:42:33 -0000 Date: 28 Jan 2002 23:42:25 -0000 Message-ID: <20020128234225.22952.qmail@icarus.apache.org> From: rlubke@apache.org To: jakarta-watchdog-4.0-cvs@apache.org Subject: cvs commit: jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean ScopeResult.jsp errorPage.jsp negativeClassCastException.jsp negativeClassCastExceptionFwd.jsp negativeDuplicateIDFatalTranslationError.jsp negativeNotFoundAbstractInstantiationException.jsp negativeNotFoundInterfaceInstantiationException.jsp negativeNotFoundNoArgConstructorInstantiationException.jsp negativeNotFoundTypeInstantiationException.jsp negativeSessionScopeFatalTranslationError.jsp positiveApplicationScopedObject.jsp positiveBeanNameSerialized.jsp positiveBeanNameType.jsp positiveBeanNameTypeCast.jsp positiveBodyNew.jsp positiveClassTypeCast.jsp positiveNoBody.jsp positivePageScopedObject.jsp positiveRequestScopedObject.jsp positiveSessionScopedObject.jsp X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N rlubke 02/01/28 15:42:25 Added: src/server/jsp-tests/jsp/core_syntax/actions/useBean ScopeResult.jsp errorPage.jsp negativeClassCastException.jsp negativeClassCastExceptionFwd.jsp negativeDuplicateIDFatalTranslationError.jsp negativeNotFoundAbstractInstantiationException.jsp negativeNotFoundInterfaceInstantiationException.jsp negativeNotFoundNoArgConstructorInstantiationException.jsp negativeNotFoundTypeInstantiationException.jsp negativeSessionScopeFatalTranslationError.jsp positiveApplicationScopedObject.jsp positiveBeanNameSerialized.jsp positiveBeanNameType.jsp positiveBeanNameTypeCast.jsp positiveBodyNew.jsp positiveClassTypeCast.jsp positiveNoBody.jsp positivePageScopedObject.jsp positiveRequestScopedObject.jsp positiveSessionScopedObject.jsp Log: - reorg of useBean including new/modifed tests. Revision Changes Path 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/ScopeResult.jsp Index: ScopeResult.jsp =================================================================== <%@ page contentType="text/plain;charset=ISO-8859-1" %> <%-- Simple JSP to valid scoped objects created with jsp:useBean --%> <%! public void sendPass( HttpServletResponse resp ) { resp.addHeader( "status", "Test Status=PASSED" ); return; } %> <%! public void sendFail( HttpServletResponse resp, String msg ) { resp.addHeader( "status", "Test Status=FAILED - " + msg ); return; } %> <% String _scope = request.getParameter( "scope" ); String _objId = request.getParameter( "objId" ); if ( _scope.equals( "application" ) ) { if ( ( application.getAttribute( _objId ) ) != null ) { sendPass( response ); } else { sendFail( response, "Application scoped object not found in ServletContext" ); } } if ( _scope.equals( "session" ) ) { if ( ( session.getAttribute( _objId ) ) != null ) { sendPass( response ); } else { sendFail( response, "Session scoped object not found in HttpSession" ); } } if ( _scope.equals( "request" ) ) { if ( ( request.getAttribute( _objId ) ) != null ) { sendPass( response ); } else { sendFail( response, "Request scoped object not found in HttpServletResponse" ); } } if ( _scope.equals( "page" ) ) { if ( ( pageContext.getAttribute( _objId ) ) == null ) { sendPass( response ); } else { sendFail( response, "Page scoped object found in current page and should not be" ); } } %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/errorPage.jsp Index: errorPage.jsp =================================================================== errorPage <%@ page isErrorPage="true" %> <% out.println("errorPage"); %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/negativeClassCastException.jsp Index: negativeClassCastException.jsp =================================================================== negativeClassCastException <% /** Name : negativeClassCastException Description : Using a bean of a particular type declared with session scope from another page, attempt to verify that a ClassCastException is thrown if the bean on this page specifies a conflicting type. Result : Catch the ClassCastException and print a message. **/ %> <% try { %> <% } catch ( java.lang.ClassCastException cce ) { out.println( "ClassCastException successfully caught.\nTest status: PASS" ); } %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/negativeClassCastExceptionFwd.jsp Index: negativeClassCastExceptionFwd.jsp =================================================================== negativeClassCastExceptionFwd <% /** Name : negativeClassCastFwd Description: Declare a bean with session scope and then forward the request to another page. Result : None. The interesting stuff will occur in the negativeClassCastException.jsp page. **/ %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/negativeDuplicateIDFatalTranslationError.jsp Index: negativeDuplicateIDFatalTranslationError.jsp =================================================================== negativeDuplicateIDFatalTranslation <% /** Name : negativeDuplicateIDFatalTranslation Description : Verify that duplicate useBean id's within the same translation unit yeild a fatal translation error. Result : Fatal translation error **/ %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/negativeNotFoundAbstractInstantiationException.jsp Index: negativeNotFoundAbstractInstantiationException.jsp =================================================================== negativeNotFoundAbstractInstantiationException <% /** Name : negativeNotFoundAbstractInstantiationException Description : Declare a bean (no other object will be found in scope) with no beanName or type attributes, and the class attribute references an abstract object. Since the object doesn't already exist, useBean will try to create an instance and an InstantiationException will occur. Result : Catch the InstantiationException and print a message. **/ %> <% try { %> <% } catch ( InstantiationException ie ) { out.println( "InstantiationException successfully caught.\nTest status: PASS" ); } %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/negativeNotFoundInterfaceInstantiationException.jsp Index: negativeNotFoundInterfaceInstantiationException.jsp =================================================================== negativeNotFoundInterfaceInstantiationException <% /** Name : negativeNotFoundInterfaceInstantiationException Description : Declare a bean (no other object will be found in scope) with no beanName or type attributes, and the class attribute references an interface. Since the object doesn't already exist, useBean will try to create an instance and an InstantiationException will occur. Result : Catch the InstantiationException and print a message. **/ %> <% try { %> <% } catch ( java.lang.InstantiationException ie ) { out.println( "InstantiationException successfully caught.\nTest status: PASS" ); } %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/negativeNotFoundNoArgConstructorInstantiationException.jsp Index: negativeNotFoundNoArgConstructorInstantiationException.jsp =================================================================== negativeNotFoundNoArgConstructorInstantiationException <% /** Name : negativeNotFoundNoArgConstructorInstantiationException Description : Declare a bean (no other object will be found in scope) with no beanName or type attributes, and the class attribute references an object that has no no-arg constructor. Since the object doesn't already exist, useBean will try create an instance and an InstantiationException will occur. Result : Catch the InstantiationException and print a message. **/ %> <% try { %> <% } catch ( java.lang.InstantiationException ie ) { out.println( "InstantiationException successfully caught.\nTest status: PASS" ); } %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/negativeNotFoundTypeInstantiationException.jsp Index: negativeNotFoundTypeInstantiationException.jsp =================================================================== negativeNotFoundTypeInstantiationException <% /** Name : negativeNotFoundTypeInstantiationException Description : Declare a bean (no other object will be found in scope) with no beanName or class attributes, only type. Since the object doesn't already exist, an InstantiationException will occur. Result : Catch the InstantiationException and print a message. **/ %> <% try { %> <% } catch ( java.lang.InstantiationException ie ) { out.println( "InstantiationException successfully caught.\nTest status: PASS" ); } %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/negativeSessionScopeFatalTranslationError.jsp Index: negativeSessionScopeFatalTranslationError.jsp =================================================================== <%@ page session="false" %> negativeSessionScopeFatalTranslationError <% /** Name : negativeSessionScopeFatalTranslationError Description : Declare a bean with scope set to session, and configure the page so that it doesn't participate in a session. This should cause a fatal translation error. Result : Fatal translation error **/ %> <% out.println(myBean.getCount()); %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveApplicationScopedObject.jsp Index: positiveApplicationScopedObject.jsp =================================================================== positiveApplicationScopedObject 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveBeanNameSerialized.jsp Index: positiveBeanNameSerialized.jsp =================================================================== positiveBeanNameSerialized <% /** Name : positiveBeanNameRes Description : Declaring the bean using beanName. When using beanName, the bean can either be a serialized Object, or a fully qualified class. When the class is loaded, it is cast to the type specified by the "type" attribute. This test uses a fully qualfied class. Result :We should get page output without error **/ %> <% out.println( myBean.getCount() ); %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveBeanNameType.jsp Index: positiveBeanNameType.jsp =================================================================== positiveBeanNameType <% /** Name : positiveBeanNameType Description : Declaring the bean using beanName. When using beanName, the bean can either be a serialized Object, or a fully qualified class. This test uses a fully qualfied class with the same type. Result :We should get page output without error **/ %> <% out.println(myBean.getCount()); %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveBeanNameTypeCast.jsp Index: positiveBeanNameTypeCast.jsp =================================================================== positiveBeanNameTypeCast <% /** Name : positiveBeanNameTypeCast Description : Declaring the bean using beanName. When using beanName, the bean can either be a serialized Object, or a fully qualified class. When the class is loaded, it is cast to the type specified by the "type" attribute. This test uses a fully qualfied class. Result :We should get page output without error **/ %> <% out.println(myBean.getCount()); %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveBodyNew.jsp Index: positiveBodyNew.jsp =================================================================== positiveBodyNew <% /** Name : positiveBodyNew Description : Try to create a valid useBean tag in the JSP page with a non-empty body. Ensure that the classname specified does not exist. Result :Should return the contents of the HTML page along with what exists in the body. **/ %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveClassTypeCast.jsp Index: positiveClassTypeCast.jsp =================================================================== positiveClassTypeCast <% /** Name : positiveClassTypeCast Description : we are using 'class' and 'type' together and 'class' is assignable to 'type'. Result :we should get the expected page without an error **/ %> <% out.println( ncounter.getCount()); %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveNoBody.jsp Index: positiveNoBody.jsp =================================================================== positiveNoBody <% /** Name : positiveNoBody Description : Create a new instance of a bean with no body. Access the name property. Result : Returns the default instance value of the name property: hello. **/ %> 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positivePageScopedObject.jsp Index: positivePageScopedObject.jsp =================================================================== positivePageScopedObject 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveRequestScopedObject.jsp Index: positiveRequestScopedObject.jsp =================================================================== positiveRequestScopedObject 1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/useBean/positiveSessionScopedObject.jsp Index: positiveSessionScopedObject.jsp =================================================================== positiveSessionScopedObject -- To unsubscribe, e-mail: For additional commands, e-mail: