Reputation:
In .net you have the ability to Response.End() in any context you want. Is there similar functionality in Java/JSP?
Thanks,
Sam
Upvotes: 4
Views: 9691
Reputation: 2060
In my experience you have to do the following:
out.flush(); // Send out whatever hasn't been sent out yet.
out.close(); // Close the stream. Future calls will fail.
return; // Return from the JSP servelet handler.
NOTE:
This will not work inside a function because you'll just end up returning from the function but not from the JSP servelet handler (which I'm assuming is your intention).
Upvotes: 3