Mr. Bean Returns:
BEAN:
public class CurrentTimeBean { private int hours; private int minutes;public CurrentTimeBean() { java.util.Date now = new java.util.Date(); this.hours = now.getHours(); this.minutes = now.getMinutes(); }
public int getHours() { return hours; }
public int getMinutes() { return minutes(); } }
JSP:
<jsp:useBean id="time" class="CurrentTimeBean"/> <HTML> <BODY> It is now <jsp:getProperty name="time" property="minutes"/> minutes past the hour.
Oh Beano, beano, beano.