Use Java Bean in JSTL : Java Beans « JSTL « Java Tutorial






<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %>
<html>
  <head>
    <title>If Caseless</title>
  </head>

  <body>
    <c:set var="str" value="jStL" />

    <jsp:useBean id="str" type="java.lang.String" />

    <c-rt:if test='<%=str.equalsIgnoreCase("JSTL")%>'> They are
    equal</c-rt:if>
  </body>
</html>
  Download:  JSTLUseBean.zip( 1,224 k)







24.10.Java Beans
24.10.1.Use Java Bean in JSTL
24.10.2.JSTL Working With More Than One Bean
24.10.3.Set Form Data to Bean and Output