<% PageContext pageContext = (PageContext) getJspContext(); JspWriter out = pageContext.pushBody(new StringWriter()); out.print("Hello "); pageContext.popBody(); out.print("World"); %>
<% PageContext pageContext = (PageContext) getJspContext(); StringWriter sw = new StringWriter(); JspWriter out = pageContext.pushBody(sw); PageContext newPageContext = pageContext.pushPageContext(newPageContext); out.print("Hello World!"); pageContext.popPageContext(); pageContext.popBody(); %>In this example, `pushBody()` is used to set a new temporary `JspWriter` object on the stack, which is written to using `out.print()`. Another `PageContext` object is pushed onto the stack using `pushPageContext()`, which can be used to access other JSP pages. Finally, both the temporary writer and `PageContext` object are removed from the stack using `popBody()` and `popPageContext()`, respectively. The `javax.servlet.jsp` package library contains classes and interfaces for building JSP pages.