ForwardTest

Summary

The forward directive is used for runtime dispatch of current request to a static resource, JSP or servlet.

Positive Tests

positiveForwardRelHtml: We are testing for forwarding to static resources. We use relative path from current context as url
title ForwardTest
source ForwardTest.java
executeClass core_syntax.directives.forward.ForwardTest
executeArgs -TestCaseID positiveForwardRelHtml -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI
positiveForwardAbsHtml: We are testing for forwarding to static resources.we use absolute path from doc root url
title ForwardTest
source ForwardTest.java
executeClass core_syntax.directives.forward.ForwardTest
executeArgs -TestCaseID positiveForwardAbsHtml -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI
positiveSingleQuotes We check if request time attribute work with forward with a scriptlet expression given in single quotes. We expect the output with the file forwarded without error.
title ForwardTest
source ForwardTest.java
executeClass core_syntax.directives.forward.ForwardTest
executeArgs -TestCaseID positiveSingleQuotes -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI
positiveDoubleQuotes We check if request time attribute work with forward with a scriptlet expression given in double quotes. We expect the output with the file forwarded without error.
title ForwardTest
source ForwardTest.java
executeClass core_syntax.directives.forward.ForwardTest
executeArgs -TestCaseID positiveDoubleQuotes -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

Negative Tests

negativeForwardNoBuff: We are testing for forwarding to static pages using jsp:forward page tag without a buffer. we should get IllegalStateException

title ForwardTest
source ForwardTest.java
executeClass core_syntax.directives.forward.ForwardTest
executeArgs -TestCaseID negativeForwardNoBuff -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI

negativeForwardUsedStream: We are testing for forwarding to static pages using jsp:forward page tag after writing to the stream. we should get IllegalStateException

title ForwardTest
source ForwardTest.java
executeClass core_syntax.directives.forward.ForwardTest
executeArgs -TestCaseID negativeForwardUsedStream -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords positive extensionAPI