Tool[] tools = null;
// Place an appropriate "tools" attribute in the request
String state = req.getParameter("state");
if (state == null) {
req.setAttribute("tools", getTools());
}
else {
req.setAttribute("tools", getTools(state));
}
// Send the request to the JSP for processing
RequestDispatcher disp = req.getRequestDispatcher("/toolview-tag.jsp");
disp.forward(req, res);