| 1 |
<html> |
| 2 |
<%@ page session="true"%> |
| 3 |
<body> |
| 4 |
<jsp:useBean id='counter' scope='session' class='org.example.Counter' type="org.example.Counter" /> |
| 5 |
|
| 6 |
<h1>JSP1.2 Beans: 1</h1> |
| 7 |
|
| 8 |
Counter accessed <jsp:getProperty name="counter" property="count"/> times.<br/> |
| 9 |
Counter last accessed by <jsp:getProperty name="counter" property="last"/><br/> |
| 10 |
<jsp:setProperty name="counter" property="last" value="<%= request.getRequestURI()%>"/> |
| 11 |
|
| 12 |
<a href="bean2.jsp">Goto bean2.jsp</a> |
| 13 |
|
| 14 |
</body> |
| 15 |
</html> |