Modify Counter1.java so that the counter value is incremented by 2 each time. Recompile and refile the class file. NOTE: Because a servlet is persistent, you must shutdown the server and restart it before the new servlet will take effect. Show the code change.

private synchronized void increment(PrintWriter output){
output.println("This servlet has been" +
" accessed " + counter + " times.");
} //end increment


```
private synchronized void increment(PrintWriter output){
output.println("This servlet has been" +
" accessed " + counter + " times.");
counter = counter + 2;
} //end increment

```

Computer Science & Information Technology

You might also like to view...

Which of the following is a measure of image clarity?

A. pixel B. dpi C. pitch D. inch

Computer Science & Information Technology

A(n) ________ query can be designed to prompt users for criteria without having to make changes in Design view

Fill in the blank(s) with correct word

Computer Science & Information Technology

Often the front-end database file is stored on a server for increased security

Indicate whether the statement is true or false

Computer Science & Information Technology

The three fundamental stages through which a program goes are implementation, use, and maintenance.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology