You are viewing a plain text version of this content. The canonical link for it is here.
Posted to watchdog-dev@jakarta.apache.org by rl...@apache.org on 2002/01/29 00:41:14 UTC
cvs commit: jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty Errorpage.jsp positiveBeanPropertyEditor.jsp positiveSetBooleanObj.jsp positiveSetBooleanPrim.jsp positiveSetByteObj.jsp positiveSetBytePrim.jsp positiveSetCharObj.jsp positiveSetCharPrim.jsp positiveSetDoubleObj.jsp positiveSetDoublePrim.jsp positiveSetFloatObj.jsp positiveSetFloatPrim.jsp positiveSetIndexedProp.jsp positiveSetIntObj.jsp positiveSetIntPrim.jsp positiveSetLongObj.jsp positiveSetLongPrim.jsp positiveSetPropAll.jsp positiveSetPropNoParam.jsp positiveSetPropParam.jsp positiveSetPropReqTimeDoubleQuotes.jsp positiveSetPropReqTimeSingleQuotes.jsp positiveSetPropValue.jsp
rlubke 02/01/28 15:41:14
Added: src/server/jsp-tests/jsp/core_syntax/actions/setProperty
Errorpage.jsp positiveBeanPropertyEditor.jsp
positiveSetBooleanObj.jsp
positiveSetBooleanPrim.jsp positiveSetByteObj.jsp
positiveSetBytePrim.jsp positiveSetCharObj.jsp
positiveSetCharPrim.jsp positiveSetDoubleObj.jsp
positiveSetDoublePrim.jsp positiveSetFloatObj.jsp
positiveSetFloatPrim.jsp positiveSetIndexedProp.jsp
positiveSetIntObj.jsp positiveSetIntPrim.jsp
positiveSetLongObj.jsp positiveSetLongPrim.jsp
positiveSetPropAll.jsp positiveSetPropNoParam.jsp
positiveSetPropParam.jsp
positiveSetPropReqTimeDoubleQuotes.jsp
positiveSetPropReqTimeSingleQuotes.jsp
positiveSetPropValue.jsp
Log:
- reorg and addtion/modification of jsp:setProperty tests
Revision Changes Path
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/Errorpage.jsp
Index: Errorpage.jsp
===================================================================
<html>
<title>Errorpage</title>
<body bgcolor=red>
<h2>Error occured !</h2>
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveBeanPropertyEditor.jsp
Index: positiveBeanPropertyEditor.jsp
===================================================================
<html>
<title>positiveBeanPropertyEditor</title>
<body>
<% /** Name : positiveBeanPropertyEditor
Description : Using a bean that has been configured with a
PropertyEditor, validate that the editors
are in fact used.
Result : Output to the client (see comments below)
**/ %>
<jsp:useBean id="propertyBean" class="core_syntax.actions.setProperty.PropertyBean" />
<jsp:setProperty name="propertyBean" property="PString" value="Validated" />
<jsp:setProperty name="propertyBean" property="PBoolean" value="false" />
<jsp:setProperty name="propertyBean" property="PInteger" value="218" />
<!-- getProperty PString should return "PString Validated" -->
<jsp:getProperty name="propertyBean" property="PString" />
<!-- getProperty PBoolean should return "true" -->
<jsp:getProperty name="propertyBean" property="PBoolean" />
<!-- getProperty PInteger should return "218314" -->
<jsp:getProperty name="propertyBean" property="PInteger" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetBooleanObj.jsp
Index: positiveSetBooleanObj.jsp
===================================================================
<html>
<title>positiveSetBooleanObj</title>
<body>
<% /** Name : positiveSetBooleanObj
Description : use a setProperty to set a Boolean value in a bean
Result : should return a Boolean value.
**/ %>
<!-- We are testing if are able to set a Boolean property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="objectBoolean" value="true" />
<jsp:getProperty name="myBean" property="objectBoolean" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetBooleanPrim.jsp
Index: positiveSetBooleanPrim.jsp
===================================================================
<html>
<title>positiveSetBooleanPrim</title>
<body>
<% /** Name : positiveSetBooleanPrim
Description : use a setProperty to set a boolean value in a bean
Result :should return a boolean value.
**/ %>
<!-- We are testing if are able to set a PrimitiveBoolean property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="primitiveBoolean" value="false" />
<jsp:getProperty name="myBean" property="primitiveBoolean" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetByteObj.jsp
Index: positiveSetByteObj.jsp
===================================================================
<html>
<title>positiveSetByteObj</title>
<body>
<% /** Name : positiveSetByteObj
Description :use a setProperty to set a Byte value in a bean
Result :should return a Byte value.
**/ %>
<!-- We are testing if are able to set a byte property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="objectByte" value="123" />
<jsp:getProperty name="myBean" property="objectByte" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetBytePrim.jsp
Index: positiveSetBytePrim.jsp
===================================================================
<html>
<title>positiveSetBytePrim</title>
<body>
<% /** Name : positiveSetBytePrim
Description : use a setProperty to set a byte value in a bean
Result :should return a byte value.
**/ %>
<!-- We are testing if are able to set a primitiveByte property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="primitiveByte" value="123" />
<jsp:getProperty name="myBean" property="primitiveByte" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetCharObj.jsp
Index: positiveSetCharObj.jsp
===================================================================
<html>
<title>positiveSetCharObj</title>
<body>
<% /** Name : positiveSetCharObj
Description : use setProperty to set a Character value in a bean.
Result :should return a Character value.
**/ %>
<!-- We are testing if are able to set a Character property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="objectChar" value="A" />
<jsp:getProperty name="myBean" property="objectChar" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetCharPrim.jsp
Index: positiveSetCharPrim.jsp
===================================================================
<html>
<title>positiveSetCharPrim</title>
<body>
<% /** Name : positiveSetCharPrim
Description : use setProperty to set a char value in a bean.
Result :should return a char value.
**/ %>
<!-- We are testing if are able to set a Primitive Character property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="primitiveChar" value="R" />
<jsp:getProperty name="myBean" property="primitiveChar" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetDoubleObj.jsp
Index: positiveSetDoubleObj.jsp
===================================================================
<html>
<title>positiveSetDoubleObj</title>
<body>
<% /** Name : positiveSetDoubleObj
Description : use a setProperty to set a Double value in a bean
Result :should return a Double value.
**/ %>
<!-- We are testing if are able to set a Double property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="objectDouble" value="123456" />
<jsp:getProperty name="myBean" property="objectDouble" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetDoublePrim.jsp
Index: positiveSetDoublePrim.jsp
===================================================================
<html>
<title>positiveSetDoublePrim</title>
<body>
<% /** Name : positiveSetDoublePrim
Description : use a setProperty to set a double value in a bean
Result :should return a double value.
**/ %>
<!-- We are testing if are able to set a PrimitiveDouble property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="primitiveDouble" value="123456" />
<jsp:getProperty name="myBean" property="primitiveDouble" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetFloatObj.jsp
Index: positiveSetFloatObj.jsp
===================================================================
<html>
<title>positiveSetFloatObj</title>
<body>
<% /** Name : positiveSetFloatObj
Description : use a setProperty to set a Float value in a bean
Result :should return a Float value.
**/ %>
<!-- We are testing if are able to set a Float property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="objectFloat" value="15" />
<jsp:getProperty name="myBean" property="objectFloat" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetFloatPrim.jsp
Index: positiveSetFloatPrim.jsp
===================================================================
<html>
<title>positiveSetFloatPrim</title>
<body>
<% /** Name : positiveSetFloatPrim
Description : use a setProperty to set a float value in a bean
Result :should return a float value.
**/ %>
<!-- We are testing if are able to set a primitiveFloat property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="primitiveFloat" value="123" />
<jsp:getProperty name="myBean" property="primitiveFloat" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetIndexedProp.jsp
Index: positiveSetIndexedProp.jsp
===================================================================
<html>
<title>positiveSetIndexedProp</title>
<body>
<%
/**
* TestCase name : positiveSetIndexedProp
* Description : Here, the setProperty tag is used to set the value for
* an indexed property.An array is declared and defined in a
* scriptlet and then assigned through the setProperty tag, with
* an expression.
* Result : Expected to set the value of the array.
*/
%>
<%
//Declare primative arrays
byte[] bArray = { 1, 2, 3 };
char[] cArray = { '1', '2', '3' };
short[] sArray = { 1, 2, 3 };
int[] iArray = {24, 25, 26 };
float[] fArray = { 1.1f, 1.2f, 1.3f };
long[] lArray = { 1, 1, 1 };
double[] dArray = { 1.1d, 1.2d, 1.3d };
boolean[] boArray = { false, true, false };
//Declare Object arrays
Boolean[] booleanArray = { new Boolean( "true" ), new Boolean( "false" ), new Boolean( "true" ) };
Byte[] byteArray = { new Byte( Byte.MIN_VALUE ), new Byte( Byte.MAX_VALUE ) };
Character[] charArray = { new Character( '1' ), new Character( '2' ), new Character( '3' ) };
Short[] shortArray = { new Short( Short.MIN_VALUE ), new Short( Short.MAX_VALUE ) };
Integer[] integerArray = { new Integer( Integer.MIN_VALUE ), new Integer( Integer.MAX_VALUE ) };
Float[] floatArray = { new Float( 1.1f ), new Float( 1.2F ), new Float( 3.14f ) };
Long[] longArray = { new Long( Long.MIN_VALUE ), new Long( Long.MAX_VALUE ) };
Double[] doubleArray = { new Double( 1.1d ), new Double( 2.81d ), new Double( 3.14d ) };
%>
<!-- Declaring the bean without body -->
<jsp:useBean id="myBean" scope="request" class="core_syntax.actions.setProperty.SetpropBean" />
<jsp:setProperty name="myBean" property="BArray" value="<%= bArray %>" />
<jsp:setProperty name="myBean" property="CArray" value="<%= cArray %>" />
<jsp:setProperty name="myBean" property="SArray" value="<%= sArray %>" />
<jsp:setProperty name="myBean" property="IArray" value="<%= iArray %>" />
<jsp:setProperty name="myBean" property="FArray" value="<%= fArray %>" />
<jsp:setProperty name="myBean" property="LArray" value="<%= lArray %>" />
<jsp:setProperty name="myBean" property="DArray" value="<%= dArray %>" />
<jsp:setProperty name="myBean" property="boArray" value="<%= boArray %>" />
<jsp:setProperty name="myBean" property="byteArray" value="<%= byteArray %>" />
<jsp:setProperty name="myBean" property="charArray" value="<%= charArray %>" />
<jsp:setProperty name="myBean" property="shortArray" value="<%= shortArray %>" />
<jsp:setProperty name="myBean" property="integerArray" value="<%= integerArray %>" />
<jsp:setProperty name="myBean" property="floatArray" value="<%= floatArray %>" />
<jsp:setProperty name="myBean" property="longArray" value="<%= longArray %>" />
<jsp:setProperty name="myBean" property="doubleArray" value="<%= doubleArray %>" />
<jsp:setProperty name="myBean" property="booleanArray" value="<%= booleanArray %>" />
<!-- Accessing the property through a scriptlet -->
<%
// Accessing the set property.
byte[] bary = myBean.getBArray();
for(int j = 0; j < bary.length; j++ ) {
if ( j == bary.length - 1 ) {
out.println( bary[ j ] );
} else {
out.print( bary[ j ] + " " );
}
}
char[] cary = myBean.getCArray();
for(int j = 0; j < cary.length; j++ ) {
if ( j == cary.length - 1 ) {
out.println( cary[ j ] );
} else {
out.print( cary[ j ] + " " );
}
}
short[] sary = myBean.getSArray();
for(int j = 0; j < sary.length; j++ ) {
if ( j == sary.length - 1 ) {
out.println( sary[ j ] );
} else {
out.print( sary[ j ] + " " );
}
}
int[] iary = myBean.getIArray();
for(int j = 0; j < iary.length; j++ ) {
if ( j == iary.length - 1 ) {
out.println( iary[ j ] );
} else {
out.print( iary[ j ] + " " );
}
}
float[] fary = myBean.getFArray();
for(int j = 0; j < fary.length; j++ ) {
if ( j == fary.length - 1 ) {
out.println( fary[ j ] );
} else {
out.print( fary[ j ] + " " );
}
}
long[] lary = myBean.getLArray();
for(int j = 0; j < lary.length; j++ ) {
if ( j == lary.length - 1 ) {
out.println( lary[ j ] );
} else {
out.print( lary[ j ] + " " );
}
}
double[] dary = myBean.getDArray();
for(int j = 0; j < dary.length; j++ ) {
if ( j == dary.length - 1 ) {
out.println( dary[ j ] );
} else {
out.print( dary[ j ] + " " );
}
}
boolean[] boary = myBean.getBoArray();
for(int j = 0; j < boary.length; j++ ) {
if ( j == boary.length - 1 ) {
out.println( boary[ j ] );
} else {
out.print( boary[ j ] + " " );
}
}
Byte[] byteary = myBean.getByteArray();
for(int j = 0; j < byteary.length; j++ ) {
if ( j == byteary.length - 1 ) {
out.println( byteary[ j ] );
} else {
out.print( byteary[ j ] + " " );
}
}
Character[] charary = myBean.getCharArray();
for(int j = 0; j < charary.length; j++ ) {
if ( j == charary.length - 1 ) {
out.println( charary[ j ] );
} else {
out.print( charary[ j ] + " " );
}
}
Short[] shortary = myBean.getShortArray();
for(int j = 0; j < shortary.length; j++ ) {
if ( j == shortary.length - 1 ) {
out.println( shortary[ j ] );
} else {
out.print( shortary[ j ] + " " );
}
}
Integer[] intary = myBean.getIntegerArray();
for(int j = 0; j < intary.length; j++ ) {
if ( j == intary.length - 1 ) {
out.println( intary[ j ] );
} else {
out.print( intary[ j ] + " " );
}
}
Float[] floatary = myBean.getFloatArray();
for(int j = 0; j < floatary.length; j++ ) {
if ( j == floatary.length - 1 ) {
out.println( floatary[ j ] );
} else {
out.print( floatary[ j ] + " " );
}
}
Long[] longary = myBean.getLongArray();
for(int j = 0; j < longary.length; j++ ) {
if ( j == longary.length - 1 ) {
out.println( longary[ j ] );
} else {
out.print( longary[ j ] + " " );
}
}
Double[] doary = myBean.getDoubleArray();
for(int j = 0; j < doary.length; j++ ) {
if ( j == doary.length - 1 ) {
out.println( doary[ j ] );
} else {
out.print( doary[ j ] + " " );
}
}
Boolean[] bolary = myBean.getBooleanArray();
for(int j = 0; j < bolary.length; j++ ) {
if ( j == bolary.length - 1 ) {
out.println( bolary[ j ] );
} else {
out.print( bolary[ j ] + " " );
}
}
%>
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetIntObj.jsp
Index: positiveSetIntObj.jsp
===================================================================
<html>
<title>positiveSetIntObj</title>
<body>
<% /** Name : positiveSetIntObj
Description :use a setProperty to set a Integer value in a bean.
Result :should return a Integer value.
**/ %>
<!-- We are testing if are able to set an int property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="objectInt" value="21" />
<jsp:getProperty name="myBean" property="objectInt" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetIntPrim.jsp
Index: positiveSetIntPrim.jsp
===================================================================
<html>
<title>positiveSetIntPrim</title>
<body>
<% /** Name : positiveSetIntPrim
Description :use a setProperty to set a int value in a bean.
Result :should return a int value.
**/ %>
<!-- We are testing if are able to set a PrimitiveInt property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="primitiveInt" value="12" />
<jsp:getProperty name="myBean" property="primitiveInt" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetLongObj.jsp
Index: positiveSetLongObj.jsp
===================================================================
<html>
<title>positiveSetLongObj</title>
<body>
<% /** Name : positiveSetLongObj
Description : use a setProperty to set a Long value in a bean
Result :should return a Long value.
**/ %>
<!-- We are testing if are able to set a Long property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="objectLong" value="12345" />
<jsp:getProperty name="myBean" property="objectLong" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetLongPrim.jsp
Index: positiveSetLongPrim.jsp
===================================================================
<html>
<title>positiveSetLongPrim</title>
<body>
<% /** Name : positiveSetLongPrim
Description : use a setProperty to set a long value in a bean
Result :should return a long value.
**/ %>
<!-- We are testing if are able to set a Long property and get it -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="primitiveLong" value="54321" />
<jsp:getProperty name="myBean" property="primitiveLong" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetPropAll.jsp
Index: positiveSetPropAll.jsp
===================================================================
<html>
<title>positiveSetPropAll</title>
<body>
<% /** Name : positiveSetPropAll
Description : Create a valid useBean action in JSP. Set all properties
of that bean from the request using a
<jsp:setProperty property="*"> action. Then access all
properties of the bean.
Result : The client request will set name=Frodo, num=116165, str=Validated, as
a result, these values should be displayed when accessed.
**/ %>
<!-- Declaring the bean with out body -->
<jsp:useBean id="myBean" scope="request" class="core_syntax.actions.setProperty.SetpropBean" />
<jsp:setProperty name="myBean" property="*" />
<!-- Accessing the properties thru a scriptlet -->
<% out.print(myBean.getStr()); %><br>
<% out.print(myBean.getName()); %><br>
<% out.print(myBean.getNum()); %><br>
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetPropNoParam.jsp
Index: positiveSetPropNoParam.jsp
===================================================================
<html>
<title>positiveSetPropNoParam</title>
<body>
<% /** Name : positiveSetPropNoParam
Description : Create a valid useBean action in JSP. Set a specific
property of that bean from the request using a
<jsp:setProperty property="propName"> action. Then access
that property.Ensure that the request contains a parameter
with the same name as the Bean Name.
Result :As we are setting "param as Str=SAPPOTA"
It should return "SAPPOTA".
**/ %>
<!-- Declaring the bean with body -->
<jsp:useBean id="myBean" scope="request" class="core_syntax.actions.setProperty.SetpropBean">
<jsp:setProperty name="myBean" property="str" />
</jsp:useBean>
<!-- Accessing the property thru a scriptlet -->
<%
out.println(myBean.getStr());
%>
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetPropParam.jsp
Index: positiveSetPropParam.jsp
===================================================================
<html>
<title>positiveSetPropParam</title>
<body>
<% /** Name : positiveSetPropParam
Description : Create a valid useBean action in JSP. Set a specific
property of that bean from the request using a
<jsp:setPropertyparam="paramname> action.
Then access that property.
Result : As we are setting "param as Name=MANGO", It should
return "MANGO".
**/ %>
<!-- Declaring the bean with out body -->
<jsp:useBean id="myBean" scope="request" class="core_syntax.actions.setProperty.SetpropBean" />
<jsp:setProperty name="myBean" property="name" param="Name" />
<!-- Accessing the property thru a scriptlet -->
<%
out.println(myBean.getName());
%>
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetPropReqTimeDoubleQuotes.jsp
Index: positiveSetPropReqTimeDoubleQuotes.jsp
===================================================================
<html>
<title>positiveSetPropReqTimeDoubleQuotes</title>
<body>
<% /** Name : positiveSetPropReqTimeDoubleQuotes
Description : use a scriptlet expression in double quotes
as 'value' attribute in setProperty
Result :we should get the expected page without error
**/ %>
<!-- testing if are able to set a property using double quoted expression -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="path" value="<%= request.getProtocol() %>" />
<jsp:getProperty name="myBean" property="path" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetPropReqTimeSingleQuotes.jsp
Index: positiveSetPropReqTimeSingleQuotes.jsp
===================================================================
<html>
<title>positiveSetPropReqTimeSingleQuotes</title>
<body>
<% /** Name : positiveSetPropReqTimeSingleQuotes
Description : use a scriptlet expression in single quotes
as 'value' attribute in setProperty
Result :we should get the expected page without error
**/ %>
<!-- testing if are able to set a property using single quoted expression -->
<jsp:useBean id="myBean" class="core_syntax.actions.setProperty.MiscBean" />
<jsp:setProperty name="myBean" property="path" value='<%= request.getProtocol() %>' />
<jsp:getProperty name="myBean" property="path" />
</body>
</html>
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/jsp/core_syntax/actions/setProperty/positiveSetPropValue.jsp
Index: positiveSetPropValue.jsp
===================================================================
<html>
<title>positiveSetPropValue</title>
<body>
<% /** Name : positiveSetPropValue
Description : Create a valid useBean action in JSP. Set a specific
property of that bean from the request using a
<jsp:setProperty value="propValue"> action.
Then access that property.
Result : Should return the new value of that property.
**/ %>
<!-- Declaring the bean with out body -->
<jsp:useBean id="myBean" scope="request" class="core_syntax.actions.setProperty.SetpropBean" />
<jsp:setProperty name="myBean" property="name" value="KHATTA-MEETHA" />
<!-- Accessing the property thru a scriptlet -->
<%
out.println(myBean.getName());
%>
</body>
</html>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>