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...
A(n) ________ % transparency fill is clear
Fill in the blank(s) with correct word
Computer Science & Information Technology
In a Do...Loop statement, the keyword While indicates that the loop instructions should be processed while the condition is false.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology