title: Using Bean Class variable into the Jsp (UI layer) in java
body: <p>I want to use "if condition and while loop" in struts1 framework. I have a Bean class with setter() and getter() methods for fname and lname property. How to use that bean variable in jsp for checking if condition? How to check if condition?</p>
  
  <p>For example:</p>
  
  <pre><code>if (firstname==lastname)
      { some action... }
  </code></pre>