# JspFactoryTest

### Summary

The JspFactory provides a mechanism to instantiate platform dependent objects in a platform independent manner.

### Tests

positiveGetDefaultFactory: we call the static method getDefault factory in the jsp we expect a non value for the default factory

title | JspFactoryTest
source | JspFactoryTest.java
executeClass | engine.JspFactory.JspFactoryTest
executeArgs | -TestCaseID positiveGetDefaultFactory -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive JSP extensionAPI

positiveSetDefaultFactory: use getDefaultFactory to get a factory object. use the same object for setting as default page should get compiled without error and we should get the output

title | JspFactoryTest
source | JspFactoryTest.java
executeClass | engine.JspFactory.JspFactoryTest
executeArgs | -TestCaseID positiveSetDefaultFactory -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive JSP extensionAPI

positiveGetPageContext: we use getDefaultFactory to get a valid factory object and call getPageContext and on the obtained object call a pagecontext method we should get no compile time error and pagecontext method should work

title | JspFactoryTest
source | JspFactoryTest.java
executeClass | engine.JspFactory.JspFactoryTest
executeArgs | -TestCaseID positiveGetPageContext -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive JSP extensionAPI

positiveReleasePageContext: use getDefaultFactory and use it to create a pageContext object.use the method releasePageContext with the pageContext created and then call getServletResponse method we should get null as result of getServletResponse for the pageContext after release method

title | JspFactoryTest
source | JspFactoryTest.java
executeClass | engine.JspFactory.JspFactoryTest
executeArgs | -TestCaseID positiveReleasePageContext -ServerHost $servletServerHost -ServerPort $servletServerPort -UrlMaps $servletMaps
keywords | positive JSP extensionAPI