53 |
|
|
54 |
try { |
try { |
55 |
String files_single[] = {"/var/log/apache2/app_access.log"}; |
String files_single[] = {"/var/log/apache2/app_access.log"}; |
56 |
String files_multi[] = {"/var/log/apache2/app_access.log.2.gz", "/var/log/apache2/app_access.log.1", "/var/log/apache2/app_access.log"}; |
String files_multi[] = {"/var/log/apache2/app_access.log.3.gz", "/var/log/apache2/app_access.log.2.gz", "/var/log/apache2/app_access.log.1", "/var/log/apache2/app_access.log"}; |
57 |
|
|
58 |
String files[]; |
String files[]; |
59 |
|
|
226 |
|
|
227 |
return kmlData; |
return kmlData; |
228 |
} |
} |
229 |
|
|
230 |
|
boolean enabled(String param) { |
231 |
|
if (param == null || param.equals("")) { |
232 |
|
return false; |
233 |
|
} |
234 |
|
|
235 |
|
int p = 0; |
236 |
|
try { |
237 |
|
p = Integer.parseInt(param); |
238 |
|
} catch (Exception e) {} |
239 |
|
|
240 |
|
return (p != 0); |
241 |
|
} |
242 |
|
|
243 |
@Override |
@Override |
244 |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
245 |
|
|
246 |
boolean multiple = req.getParameter("multi") != null; |
boolean multiple = enabled( req.getParameter("multi") ); |
247 |
|
|
248 |
String kmlData = getRequestsFromFile(multiple); |
String kmlData = getRequestsFromFile(multiple); |
249 |
|
|
250 |
if (req.getParameter("zip") != null) { |
if ( enabled(req.getParameter("zip")) ) { |
251 |
|
|
252 |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
253 |
|
|