DeclarationTest

Summary

Declarations are used to declare variables and methods in the scripting language used in the JSP page. Declarations do not produce any output into the current "out" stream.Declarations are initialised when the JSP page is initialised and made available to other declarations, scriptlets and expressions.

Positive Tests

positiveDeclaration Test: Create a JSP page with a valid Java declaration element. Use the declared variable in the page in a scriptlet.

title DeclarationTest
source DeclarationTest.java
executeClass core_syntax.scripting.declaration.DeclarationTest
executeArgs -TestCaseID positiveDeclaration -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

Negative Tests

negativeDeclarationSyn Test: Create a JSP page which has a syntax error in the declaration statement. Try to use the declared variable in the rest of the page.

title DeclarationTest
source DeclarationTest.java
executeClass core_syntax.scripting.declaration.DeclarationTest
executeArgs -TestCaseID negativeDeclarationSyn -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI