-
public static final String convertToString(HttpServletRequest request) {
StringBuffer msg = new StringBuffer();
try {
msg.append("*RequestURI:" + request.getRequestURI() + "\n");
msg.append("*ContentType:" + request.getContentType() + "\n");
msg.append("== Request Header\n");
Enumeration headers = request.getHeaderNames();
while (headers.hasMoreElements()) {
String headerName = "" + headers.nextElement();
msg.append(headerName + ":" + request.getHeader(headerName) + "\n");
}
msg.append("\n");
Enumeration attr = request.getParameterNames();
ArrayList l = new ArrayList();
String att;
while (attr.hasMoreElements()) {
att = (String) attr.nextElement();
l.add(att + " -> " + request.getParameter(att));
}
msg.append("=== Request ( " + l.size() + " ) ===\n");
Object a[] = l.toArray();
Arrays.sort(a);
for (int i = 0; i < a.length; i++) {
msg.append((String) a[i]);
msg.append("\n");
}
msg.append("=== === ===\n");
// Process the Session
HttpSession session = request.getSession();
// msg.append("\n");
Enumeration e = session.getAttributeNames();
TreeMap t = new TreeMap();
String k;
while (e.hasMoreElements()) {
k = (String) e.nextElement();
Object oggetto;
try {
oggetto = session.getAttribute(k);
} catch (Throwable notSerializableException) {
oggetto = "NON DESERIALIZZABILE. Chiave:" + k;
}
t.put(k, oggetto);
}
Object orderedKeys[] = t.keySet().toArray();
msg.append("=== Session ( " + orderedKeys.length + " " + (usertempz != null ? "+ 1UT" : " NO UT!") + " )===\n");
Object elem;
for (int i = 0; i < orderedKeys.length; i++) {
elem = t.get(orderedKeys[i]);
msg.append(orderedKeys[i]);
msg.append("\t-> ");
if (elem != null) {
nicePrintSessionObj(msg, elem);
} else {
msg.append("null");
}
msg.append("\n");
}
return msg.toString();
} catch (RuntimeException e) {
return msg + "\nERR: Cannot print session/request!!" + e.getMessage();
}
}
Read More -
Ma come fare a gestire la biancheria in questi casi? Ebbene il vostro mentore (cioè io...) ha la soluzione. Grazie a Radio Deejay, ho scoperto il seguente fantastico servizio: http://www.stendibiancheria.net/
che vi dice quando vi conviene stendere la biancheria. Questo modesto servizio, migliora le probabilià di essere più puliti del solito, ed evita che i panni bianchi si sporchino senza una valida ragione.
Read More -
Celeste
Celeste is a mail reading and organizing program. The name "Celeste" is a reference to an earlier mail reader named Baba, which was written at Xerox PARC by Steve Putz and John Maloney.
Nowadays, Celeste is maintained by Giovanni Giorgi (me).Latest Feature
A new revision is planned for the end of September 2006, and code name will be "Sonic". Sonic will include a smart mailing-list filter and a better "leave message on server" option. I implemented years ago an auto-filtering system in AppleScript. The filtering engine used the RFC2369 and some other tricks to detect yahoo mailing list. Sonic will have also an auto-filter for google mailing list too.The leave message on server option is quite bad now. It creates a lot of duplicated messages.
The new implementation will avoid dowloading twice a message, using a mix of messageId and timestamp to detect duplicated messages.
Read More