|
[Exercise | API Docs | Short Course| Exercises] Help is available for each task. Task 1
Develop a simple counter bean, Develop a bean which can maintain a count within say, an integer property. Provide at least a getter method for this property. Task 2Compile the counter bean.
You can compile the bean as Task 3Deploy the bean within Tomcat.
Copy Task 4Develop a JSP page, You can use the jsp:useBean tag for instantiating the beans. Make sure you provide the appropriate scope for the scope attribute. Task 5Deploy the JSP file for the example within Tomcat.
Assuming you have installed Tomcat in say, Task 6Run the example.
From your browser (say, Netscape Navigator), access the URL
Now, start up a different browser (say, MSIE) access the URL (Note: If you use only MSIE, you can simply double click on the browser icon again to run a second instance of MSIE as a separate process. This is important to ensure that the browser creates a new session and does not reuse the one created by an earlier instance.) Click a few times within both browser to increment the counters for the beans with session and application scope. Observe the difference between the twocounts. Copyright 1996-2000 jGuru.com. All Rights Reserved. | ||||||||||
|
| ||||||||||||