We reviewed the class on Tue. Here's what we developed then: <% String action = request.getParameter("action"); String counter = request.getParameter("counter"); if (counter == null) { counter = "0"; } else { if (action.equals("Go Up!")) { counter = (Integer.parseInt(counter) + 1) + ""; } else if ("Go Down!".equals(action)) { counter = (Integer.parseInt(counter) - 1) + ""; } else { } } %>

<%=counter%>

This was slightly more than the program we wrote on Tue. We then discussed servlets and put together this servlet: import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class One extends HttpServlet { public void doGet( HttpServletRequest a, HttpServletResponse b ) throws ServletException, IOException { b.setContentType("text/html"); PrintWriter out = b.getWriter(); out.println("Hi there!"); } } We didn't get to run this. We discussed however that it needs to be compiled, described (web.xml) and deployed. Tomorrow in lab we finish this and then you can start on Homework Seven and finish it.