I am using the following if condition but it does not work.
When the jsp page is loaded the output will be shown without checking the condition.
- The code is expect to receive the values of a form put them in obj property and send them to Xclass when the result "o" was received it should should the message.
my.jsp
<jsp:useBean id="obj" class="com.User"/>
<jsp:setProperty property="*" name="obj"/>
<%
String myoutput = myclass.Xclass(obj);
out.print(myoutput);
if(myclass.Xclass(obj).equals("output"))
{
out.print("message goes here");
}
%>
myclass.class
public String Xclass(User obj){
return "output";
}