%@ taglib uri="/WEB-INF/taglibs/cal.tld" prefix="cal" %> <% String base_dir = request.getContextPath(); Integer weeks = 2; String type = "Daily"; String date = ""; if (request.getAttribute("type") != null) { type = (String) request.getAttribute("type"); } if (request.getAttribute("date") != null) { date = (String) request.getAttribute("date"); } if (request.getParameter("weeks") != null) { try { weeks = Integer.parseInt(request.getParameter("weeks")); } catch (NumberFormatException e) { //ignore - default value is used } } %>