Home

 

Modifying the servlet (step 2b - cvsuser1)

While activities in "Adding a shared project to the workspace (step 2a - cvsuser2)" occur, our original user, cvsuser1, is working on developing the servlet further.

In the first workspace created for cvsuser1, do these steps:

In the Enterprise Explorer, open ServletA.java (in RAD75CVSGuide/Java Resources/src/itso.rad75.teamcvs.servlet).

Create a static attribute called totalCount of type int and initialized to zero as highlighted in Example | 8-4. Save and close the servlet.

Example 28-4 ServeltA gets a static attribute

package itso.rad75.teamcvs.servlet;
.....
public class ServletA extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private static int totalCount = 0;
	public ServletA() {
		super();
	}
.....
}

ibm.com/redbooks