How to break jsp code

I can use code like" if(a==null){//System.exit(0); //break; //sth else to end app}but How do I implement such task in jsp simply,How can I do to make some code below( html code maybe ) not to be executed by giving a condition.
[289 byte] By [xutoaa] at [2007-10-2 12:15:28]
# 1
Depends. How are you writing your JSP's, with scriptlets (<% code %>) or with JSTL?
gimbal2a at 2007-7-13 9:00:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

in my case

I use code like this

<%

try

{

Initialcontext ic = new Initia ...// find ejb ref

}catch(Excetpion e)

{

//jump out html code below ,or it will show exception msg on page

}

%>

//below are html code

....

<a> <%=ejb.getsth%>

..

and I should jump out the html code if ejb ref is null(exception occured)

xutoaa at 2007-7-13 9:00:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Redirect to an error page, otherwise what are you going to display the user, a blank page?btw: System.exit(0) will kill your app server without the relevant SecurityManager in place.
YoGeea at 2007-7-13 9:00:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
maybe a blank page is ok
xutoaa at 2007-7-13 9:00:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
> maybe a blank page is okErm, I'd go with the error page.
YoGeea at 2007-7-13 9:00:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

Hi friend,

My first question about this post is....

I need to get some clarity.....

i belive we are writing a server side application using JSP/SERVELET not a standalone client side application.

As per the earlier post if we use System.exit that will certainly stop the webserver.

Accronding to his description.

The thing shud be done at the client side.

For which the web browser shud be closed automatically.

No this may not be possible by using JSP direclty,unless and until someone can take someother means of doing this..

Like java script,May be loading a JAVA applet with full client permission accordingly and other stuff's....

This wat we can think of at this point.....

Regards,

RAHUL

RahulSharnaa at 2007-7-13 9:00:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
Take A hammer And Struct to the .jsp file so u can break the jsp code
daxesh_modasiya@yahoo.coma at 2007-7-13 9:00:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...