Sefran2
Sefran2

Reputation: 3588

Accessing a javabean from a jsp page

I've a session bean with some string properties.

How could I access it and its properties from a jsp page, checking if one of them is equal or not to a given string?

I think I've to use <c:choose> and <bean:write> tag, but how? An example?

Upvotes: 0

Views: 78

Answers (1)

Dave Newton
Dave Newton

Reputation: 160321

<c:if test="${beanName.beanProp == 'the string'}">
  It's equal.
</c:if>

Upvotes: 1

Related Questions