Michael Fuhrman wrote:

> Hello All,
>
> Simple question .. In asp, there's a response.end .. which terminates the
> activity of the ASP page.  Is there an equivalent, or do I just EXIT (0);
>
> Hoping there's a cleaner way!
>

By default, you don't need to do anything at all.  At the end of your JSP page,
the generated code flushes the output stream for you, and gets ready for the next
request.

If you want to terminate the output at a particular point, the simplest way would
be with a Java Scriptlet like this:

<%
    out.flush();
    return;
%>

This works because your JSP page is encapsulated in the service() method of a Java
Servlet created by the JSP page compiler, and you can return from a method any
time you want.  The "flush" call ensures that any previously generated output
(i.e. the contents of your page up to this point) are actually sent back to the
browser.


>
> Michael J. Fuhrman
> Reliable Business Computers
> http://www.creliable.com
>

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to