368 |
return (p != 0); |
return (p != 0); |
369 |
} |
} |
370 |
|
|
371 |
|
int getCount(String param) { |
372 |
|
if (param == null || param.equals("")) { |
373 |
|
return 1; |
374 |
|
} |
375 |
|
|
376 |
|
return Integer.parseInt(param); |
377 |
|
} |
378 |
|
|
379 |
|
|
380 |
@Override |
@Override |
381 |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
382 |
|
|
383 |
|
|
384 |
int count = Integer.parseInt( req.getParameter("count") ); |
int count = getCount( req.getParameter("count") ); |
385 |
|
|
386 |
if (count > 30) //limit to 30 days |
if (count > 30) //limit to 30 days |
387 |
count = 30; |
count = 30; |