ExpressionsTest

Summary

JSP expression element is a scripting language expression , which is evaluated and the result is coerced to 'String' which is subsequently emitted into the current "out" PrintWriter object.

Positive Tests

positiveExpr Test: Create a valid JSP expression. Call the JSP page.

title ExpressionsTest
source ExpressionsTest.java
executeClass core_syntax.scripting.expressions.ExpressionsTest
executeArgs -TestCaseID positiveExpr -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

positiveExprComment Test: Create a JSP page with a JSP expression inserted into a HTML comment.

title ExpressionsTest
source ExpressionsTest.java
executeClass core_syntax.scripting.expressions.ExpressionsTest
executeArgs -TestCaseID positiveExprComment -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

positiveExprBean Test: Use a bean with the useBean action in the page. Then try to retrieve one of its properties with an expression.

title ExpressionsTest
source ExpressionsTest.java Counter.java
executeClass core_syntax.scripting.expressions.ExpressionsTest
executeArgs -TestCaseID positiveExprBean -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

positiveExprSyntax Test: Create an expression in the page with no space between the start tag and the expression. Similarly have no space between the end of the expression and the end tag.

title ExpressionsTest
source ExpressionsTest.java
executeClass core_syntax.scripting.expressions.ExpressionsTest
executeArgs -TestCaseID positiveExprSyntax -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

Negative Tests

negativeExprBean Test: Use a bean with the useBean action in the page. Now try to set one of its properties using an expression.

title ExpressionsTest
source ExpressionsTest.java Counter.java
executeClass core_syntax.scripting.expressions.ExpressionsTest
executeArgs -TestCaseID negativeExprBean -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

negativeExprSyntax Test: Create an invalid expression element. Try to call the JSP page.

title ExpressionsTest
source ExpressionsTest.java
executeClass core_syntax.scripting.expressions.ExpressionsTest
executeArgs -TestCaseID negativeExprSyntax -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI