Java Reference
In-Depth Information
L ISTING 17.8
Continued
<body>
<H3>Application Bean Example 2</H3>
<center><b>The current count for the counter bean is: </b>
<%=counter.getCount() %></center>
</body>
</html>
Go ahead and copy both of these JSPs to the < SERVER_ROOT >/djs/ directory and open your
browser to the following URL:
http:// localhost /djs/ApplicationBean1.jsp
Click the reload button a few times and watch the count go up. You will see a page similar to
Figure 17.4.
F IGURE 17.4
The output from ApplicationBean1.jsp .
Now open another browser window to the second JSP using the following URL:
http:// localhost /djs/ApplicationBean2.jsp
Search WWH ::




Custom Search