Making Stateful Components
A second method or technique for improving performance of applications is to make components stateless where appropriate.
The best way to discover statelessness is to look at a component that is stateful. In other words, look at a component that can't be made stateless.
Examining a Stateful Component
In this subsection we're going to a simple component, WOToggle, as an exercise. It is a component switch that can be toggled between an on and off state.
Create a new project, WOToggleTest, and add a new component, WOToggle, to the Application Server, as normal.
Copy in the images PowerSwitch_Off.gif and PowerSwitch_On.gif from /System/Library/WebObjects/JavaApplications/JavaMonitor.woa/WebSeverResources/ into the Web Server ...