Return-Path: Mailing-List: contact watchdog-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list watchdog-dev@jakarta.apache.org Received: (qmail 84610 invoked from network); 9 Jan 2000 08:30:37 -0000 Received: from scaup.prod.itd.earthlink.net (207.217.121.49) by 63.211.145.10 with SMTP; 9 Jan 2000 08:30:37 -0000 Received: from DRF26 (dialup-209.245.6.185.Denver1.Level3.net [209.245.6.185]) by scaup.prod.itd.earthlink.net (8.9.3/8.9.3) with SMTP id AAA07181 for ; Sun, 9 Jan 2000 00:29:16 -0800 (PST) Message-ID: <01ae01bf5a7b$8ac7cb50$b906f5d1@DRF26> From: "Danno Ferrin" To: Subject: [PATCH] Get and Set Property Date: Sun, 9 Jan 2000 01:28:41 -0700 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_01AB_01BF5A40.DD21F460" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.5600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.5600 This is a multi-part message in MIME format. ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit First, the positiveGetProperty test is invalid. It assumes that "Name" is the property associated with "getName" and "setName". Committing this will "break" the current tomcat, but I am posting a patch to that as well. Second, four new tests are added (all negative), one each for getting and setting a non existant property and one for getting a write only and one for setting a read only property. Diff -u does not put the contents of the eight new files in the patch, so I am attaching them. You can see from the diff where they go. --------------------------------------------------------------------------- ? src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/getProperty/n egativeGetPropNotProperty.java ? src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/getProperty/n egativeGetPropNotRead.java ? src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/setProperty/n egativeSetPropNotWrite.java ? src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/setProperty/n egativeSetPropNotProperty.java ? src/server/jsp-tests/jsp/core_syntax/beantests/getProperty/negativeGetPropNo tRead.jsp ? src/server/jsp-tests/jsp/core_syntax/beantests/getProperty/negativeGetPropNo tProperty.jsp ? src/server/jsp-tests/jsp/core_syntax/beantests/setProperty/negativeSetPropNo tProperty.jsp ? src/server/jsp-tests/jsp/core_syntax/beantests/setProperty/negativeSetPropNo tWrite.jsp Index: src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/getProperty/n egativeGetProps.java =================================================================== RCS file: /home/cvspublic/jakarta-watchdog/src/clients/org/apache/jcheck/jsp/client/co re_syntax/beantests/getProperty/negativeGetProps.java,v retrieving revision 1.2 diff -u -r1.2 negativeGetProps.java --- negativeGetProps.java 1999/11/09 20:38:51 1.2 +++ negativeGetProps.java 2000/01/09 07:55:09 @@ -75,7 +75,7 @@ TestResult testResult = null; HttpURLConnection connection = null; - setErrorCode (404); + setErrorCode (500); try { connection = getConnection(); Index: src/clients/org/apache/jcheck/jsp/client/core_syntax/beantests/setProperty/n egativePropSyntax.java =================================================================== RCS file: /home/cvspublic/jakarta-watchdog/src/clients/org/apache/jcheck/jsp/client/co re_syntax/beantests/setProperty/negativePropSyntax.java,v retrieving revision 1.2 diff -u -r1.2 negativePropSyntax.java --- negativePropSyntax.java 1999/11/09 20:38:54 1.2 +++ negativePropSyntax.java 2000/01/09 07:55:10 @@ -75,7 +75,7 @@ TestResult testResult = null; HttpURLConnection connection = null; - setErrorCode (404); + setErrorCode (500); try { connection = getConnection(); Index: src/clients/org/apache/jcheck/jsp/resources/LocalStrings.properties =================================================================== RCS file: /home/cvspublic/jakarta-watchdog/src/clients/org/apache/jcheck/jsp/resources /LocalStrings.properties,v retrieving revision 1.1 diff -u -r1.1 LocalStrings.properties --- LocalStrings.properties 1999/11/09 23:10:18 1.1 +++ LocalStrings.properties 2000/01/09 07:55:14 @@ -61,7 +61,12 @@ negativePropSyntax.description = negativePropSyntax +negativeSetPropNotProperty.description = negativeSetPropNotProperty +negativeSetPropNotWrite.description = negativeSetPropNotWrite + negativeGetProps.description = negativeGetProps +negativeGetPropNotProperty.description = negativeGetPropNotProperty +negativeGetPropNotRead.description = negativeGetPropNotRead positiveSetBooleanObj.description = positiveSetBooleanObj positiveSetBooleanObj.goldenFile = core_syntax/beantests/setProperty/positiveSetBooleanObj.html Index: src/clients/org/apache/jcheck/props/jsp-tests.properties =================================================================== RCS file: /home/cvspublic/jakarta-watchdog/src/clients/org/apache/jcheck/props/jsp-tes ts.properties,v retrieving revision 1.4 diff -u -r1.4 jsp-tests.properties --- jsp-tests.properties 1999/11/09 20:39:16 1.4 +++ jsp-tests.properties 2000/01/09 07:55:16 @@ -155,8 +155,13 @@ org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeDupIDSess ion1=core_syntax/beantests/useBean/negativeDupIDSession1.jsp org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeInvalidCl ass=core_syntax/beantests/useBean/negativeInvalidClass.jsp org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeNoBody=co re_syntax/beantests/useBean/negativeNoBody.jsp -org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeProp Syntax=core_syntax/beantests/setProperty/negativePropSyntax -org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP rops=core_syntax/beantests/getProperty/negativeGetProps +org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeSetP ropNotWrite=core_syntax/beantests/setProperty/negativeSetPropNotWrite.jsp +org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeSetP ropNotProperty=core_syntax/beantests/setProperty/negativeSetPropNotProperty. jsp +org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeProp Syntax=core_syntax/beantests/setProperty/negativePropSyntax.jsp +org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP rops=core_syntax/beantests/setProperty/negativeGetProps.jsp +org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP ropNotRead=core_syntax/beantests/getProperty/negativeGetPropNotRead.jsp +org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP ropNotProperty=core_syntax/beantests/getProperty/negativeGetPropNotProperty. jsp +org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP rops=core_syntax/beantests/getProperty/negativeGetProps.jsp org.apache.jcheck.jsp.client.core_syntax.scripting.declaration.negativeDecla rationSyn=core_syntax/scripting/declaration/negativeDeclarationSyn.jsp org.apache.jcheck.jsp.client.core_syntax.directives.taglib.positiveTagLib=co re_syntax/directives/taglib/positiveTagLib.jsp org.apache.jcheck.jsp.client.core_syntax.directives.include.positiveInclude= core_syntax/directives/include/positiveInclude.jsp Index: src/conf/jsp-testlist.txt =================================================================== RCS file: /home/cvspublic/jakarta-watchdog/src/conf/jsp-testlist.txt,v retrieving revision 1.8 diff -u -r1.8 jsp-testlist.txt --- jsp-testlist.txt 1999/12/16 01:48:58 1.8 +++ jsp-testlist.txt 2000/01/09 07:55:21 @@ -177,6 +177,10 @@ #org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeDupIDSes sion1 #org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeInvalidC lass #org.apache.jcheck.jsp.client.core_syntax.beantests.useBean.negativeNoBody -#org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativePro pSyntax -#org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGet Props +org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeSetP ropNotWrite +org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeSetP ropNotProperty +org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty.negativeProp Syntax +org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP rops +org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP ropNotRead +org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty.negativeGetP ropNotProperty Index: src/server/jsp-tests/WEB-INF/classes/core_syntax/beantests/getProperty/Strin gBean.java =================================================================== RCS file: /home/cvspublic/jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/core_s yntax/beantests/getProperty/StringBean.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 StringBean.java --- StringBean.java 1999/10/09 00:42:00 1.1.1.1 +++ StringBean.java 2000/01/09 07:55:22 @@ -63,7 +63,7 @@ file://Declaring the variables private String name="hello"; private int[] intAry={5,10,15}; - + private String bar="write-only"; /** * Property 'name' */ @@ -88,4 +88,12 @@ this.intAry=i; } + /** + * Property 'bar' + * String and Write only + */ + + public void setBar(String s) { + this.bar=s; + } } Index: src/server/jsp-tests/WEB-INF/classes/core_syntax/beantests/setProperty/Setpr opBean.java =================================================================== RCS file: /home/cvspublic/jakarta-watchdog/src/server/jsp-tests/WEB-INF/classes/core_s yntax/beantests/setProperty/SetpropBean.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 SetpropBean.java --- SetpropBean.java 1999/10/09 00:42:00 1.1.1.1 +++ SetpropBean.java 2000/01/09 07:55:22 @@ -65,6 +65,7 @@ private int num=0; private String str; private int[] intAry={15,20,35}; + private String bar = "read-only"; /** * Property 'Str' @@ -113,5 +114,14 @@ public void setIntAry(int[] i){ this.intAry=i; } + + /** + * property 'bar' + * This is a read only property + */ + + public String getBar() { + return bar; + } } Index: src/server/jsp-tests/jsp/core_syntax/beantests/getProperty/positiveGetProps. jsp =================================================================== RCS file: /home/cvspublic/jakarta-watchdog/src/server/jsp-tests/jsp/core_syntax/beante sts/getProperty/positiveGetProps.jsp,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 positiveGetProps.jsp --- positiveGetProps.jsp 1999/10/09 00:43:15 1.1.1.1 +++ positiveGetProps.jsp 2000/01/09 07:55:29 @@ -9,6 +9,6 @@ **/ %> - + ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: application/octet-stream; name="negativeGetPropNotProperty.java" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="negativeGetPropNotProperty.java" /* * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty; import org.apache.jcheck.jsp.util.*; import org.apache.tools.moo.jsp.*; import org.apache.tools.moo.TestResult; import java.net.HttpURLConnection; public class negativeGetPropNotProperty extends NegativeJspCheckTest { StringManager sm = StringManager.getManager(UtilConstants.Package); public String getDescription () { return sm.getString("negativeGetPropNotProperty.description"); } public TestResult runTest () { TestResult testResult = null; HttpURLConnection connection = null; setErrorCode (500); try { connection = getConnection(); int code = connection.getResponseCode(); } catch (Exception e) { try { testResult = getTestResult(connection); } catch (Exception m) { testResult = getTestResult(testResult,m); } } return testResult; } } ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: application/octet-stream; name="negativeGetPropNotRead.java" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="negativeGetPropNotRead.java" /* * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.jcheck.jsp.client.core_syntax.beantests.getProperty; import org.apache.jcheck.jsp.util.*; import org.apache.tools.moo.jsp.*; import org.apache.tools.moo.TestResult; import java.net.HttpURLConnection; public class negativeGetPropNotRead extends NegativeJspCheckTest { StringManager sm = StringManager.getManager(UtilConstants.Package); public String getDescription () { return sm.getString("negativeGetPropNotRead.description"); } public TestResult runTest () { TestResult testResult = null; HttpURLConnection connection = null; setErrorCode (500); try { connection = getConnection(); int code = connection.getResponseCode(); } catch (Exception e) { try { testResult = getTestResult(connection); } catch (Exception m) { testResult = getTestResult(testResult,m); } } return testResult; } } ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: application/octet-stream; name="negativeSetPropNotProperty.java" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="negativeSetPropNotProperty.java" /* * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty; import org.apache.jcheck.jsp.util.*; import org.apache.tools.moo.jsp.*; import org.apache.tools.moo.TestResult; import java.net.HttpURLConnection; public class negativeSetPropNotProperty extends NegativeJspCheckTest { StringManager sm = StringManager.getManager(UtilConstants.Package); public String getDescription () { return sm.getString("negativeSetPropNotProperty.description"); } public TestResult runTest () { TestResult testResult = null; HttpURLConnection connection = null; setErrorCode (500); try { connection = getConnection(); int code = connection.getResponseCode(); } catch (Exception e) { try { testResult = getTestResult(connection); } catch (Exception m) { testResult = getTestResult(testResult,m); } } return testResult; } } ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: application/octet-stream; name="negativeSetPropNotWrite.java" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="negativeSetPropNotWrite.java" /* * * The Apache Software License, Version 1.1 * * Copyright (c) 1999 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.jcheck.jsp.client.core_syntax.beantests.setProperty; import org.apache.jcheck.jsp.util.*; import org.apache.tools.moo.jsp.*; import org.apache.tools.moo.TestResult; import java.net.HttpURLConnection; public class negativeSetPropNotWrite extends NegativeJspCheckTest { StringManager sm = StringManager.getManager(UtilConstants.Package); public String getDescription () { return sm.getString("negativeSetPropNotWrite.description"); } public TestResult runTest () { TestResult testResult = null; HttpURLConnection connection = null; setErrorCode (500); try { connection = getConnection(); int code = connection.getResponseCode(); } catch (Exception e) { try { testResult = getTestResult(connection); } catch (Exception m) { testResult = getTestResult(testResult,m); } } return testResult; } } ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: application/octet-stream; name="negativeGetPropNotProperty.jsp" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="negativeGetPropNotProperty.jsp" negativeGetPropNotProperty <% /** Name : negativeGetPropNotProperty Description : Accessing a non-existant property of an explicit bean=20 through a getProperty action Result : Should return an error page. **/ %> =20 =20 ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: application/octet-stream; name="negativeGetPropNotRead.jsp" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="negativeGetPropNotRead.jsp" negativeGetPropNotRead <% /** Name : negativeGetPropNotRead Description : Accessing a write-only property of an explicit bean=20 through a getProperty action Result : Should return an error page. **/ %> =20 =20 ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: application/octet-stream; name="negativeSetPropNotProperty.jsp" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="negativeSetPropNotProperty.jsp" negativeSetPropNotProperty <% /** Name : negativeSetPropNotProperty Description : Accessing a non-existant property of an explicit bean=20 through a getProperty action Result : Should return an error page. **/ %> =20 =20 ------=_NextPart_000_01AB_01BF5A40.DD21F460 Content-Type: application/octet-stream; name="negativeSetPropNotWrite.jsp" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="negativeSetPropNotWrite.jsp" negativeSetPropNotWrite <% /** Name : negativeSetPropNotWrite Description : Accessing a read-only property of an explicit bean=20 through a getProperty action Result : Should return an error page. **/ %> =20 =20 ------=_NextPart_000_01AB_01BF5A40.DD21F460--