| <jsp:useBean id="cb" scope="session" class="xmlrep.Customer" /> <jsp:setProperty name="cb" property="id" value="45" /> <B> First Name is: </B> <%=cb.getFname() %> <p> <B> Last Name is: .</B> <%= cb.getLname() %> |
| <jsp:setProperty name="cb" property="*" /> |
| <%@taglib uri="the TLD file" prefix="foo" %> Current weather is <foo:Weather/> |
| import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; public class Weather extends TagSupport { public int doStartTag() { try { JspWriter out = pageContext.getOut(); out.print(" sunny and cloudy mixed with " + "rain and sunshine. "); } catch (IOException e) { System.out.println("Error " + e); } return (SKIP_BODY); } } |