Hi, Since JSP operates on request/response mode, how do I stop the processing in the JSP? I have tried the following without success.
The above code only prevents writing the response to the browser.Is it OK to use return or System.exit(0).What implication It might have on the JSP Engine? Thanks in advance. Regards, Sandeep Desai email@example.com
return() is OK, but what do you expect to send back to a client? Are you sending some HTML before that so that they know what's happened? I wouldn't use System.exit(), if your VM even allows it at all. ------------------ Phil Hanna Sun Certified Programmer for the Java 2 Platform Author of : JSP: The Complete Reference Instant Java Servlets Website: http://www.philhanna.com
Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>
<% return; %> this should stop the processing of service method.
Joined: Apr 02, 2001
Hi all, Thanks for the response. As you have suggested, return() should do the trick, and a proper message should be sent to the client, so that they know what has happened (Thanks Phil) Regards, ------------------ Sandeep Desai firstname.lastname@example.org
Sun Certified Java ProgrammerScored 93 per cent
Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
IBM Enterprise Connectivity with J2EE Scored 72 per cent
Enterprise Development on the Oracle Internet Platform Scored 44 out of 56