Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using a return value from a boolean function in JSP

866972Jul 18 2011 — edited Jul 18 2011
Hi,

I have a java class and a function is defined there as :

public boolean getX(String a) throws Exception {
some code...
try {

....
Y=false;
}


return Y

}

}// endclass

Now i want to use the result in my JSP. From my JSP i am calling:

mvp= class.getX(String a)
<%=
if (mvp==true)
do
this
else
%>

Is this the right way to do this ? If no, please let me know how we will be handling this.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 15 2011
Added on Jul 18 2011
2 comments
755 views