From 1c36cc1e2966b1a593cf9480e713d2cb1597a749 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Mon, 12 Nov 2001 09:37:39 +0000 Subject: [PATCH] - Stylesheet exceptions now printed in red. - Load of an already loaded stylesheet now ignored (was interpreted as reloadin before). - Version renumbered as 1.2.1beta. --- helm/uwobo/build.xml | 2 +- helm/uwobo/src/it/unibo/cs/helm/uwobo/Server.java | 9 ++------- helm/uwobo/src/it/unibo/cs/helm/uwobo/Servlet.java | 6 +++--- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/helm/uwobo/build.xml b/helm/uwobo/build.xml index 9efec3c7a..52c3557d0 100644 --- a/helm/uwobo/build.xml +++ b/helm/uwobo/build.xml @@ -4,7 +4,7 @@ - + diff --git a/helm/uwobo/src/it/unibo/cs/helm/uwobo/Server.java b/helm/uwobo/src/it/unibo/cs/helm/uwobo/Server.java index 51dbc14c8..293b2b91b 100644 --- a/helm/uwobo/src/it/unibo/cs/helm/uwobo/Server.java +++ b/helm/uwobo/src/it/unibo/cs/helm/uwobo/Server.java @@ -63,7 +63,6 @@ import org.xml.sax.helpers.*; public class Server { private static class Style implements Serializable { public String fileName; - public long lastModified; public Templates stylesheet; }; @@ -221,11 +220,9 @@ public class Server { Style style = (Style)hashMap.get(key); if (style.fileName.equals(filename)) { String msg = - "Warning: Stylesheet already loaded. Reloading..."; + "Warning: Stylesheet already loaded. Request ignored."; log(msg); - String msg2 = reload(key); - return htmlOfWarning(msg) + - (msg2.equals("") ? "" : "
" + msg2); + return htmlOfWarning(msg); } else { String res = "Error: There is already a stylesheet with keyword \""+ @@ -237,7 +234,6 @@ public class Server { Style style = new Style(); style.fileName = filename; - style.lastModified = new File(filename).lastModified(); String res = compileStylesheet(style,key); log("done!"); @@ -405,7 +401,6 @@ public class Server { Style style = (Style)hashMap.get(key); if (style != null) { log("reloading \"" + key + "\"... "); - style.lastModified = new File(style.fileName).lastModified(); res= compileStylesheet(style,key); log("done!"); } else { diff --git a/helm/uwobo/src/it/unibo/cs/helm/uwobo/Servlet.java b/helm/uwobo/src/it/unibo/cs/helm/uwobo/Servlet.java index 32014063e..d259c3f89 100644 --- a/helm/uwobo/src/it/unibo/cs/helm/uwobo/Servlet.java +++ b/helm/uwobo/src/it/unibo/cs/helm/uwobo/Servlet.java @@ -142,7 +142,7 @@ public class Servlet extends HttpServlet { } String local = e.getLocalizedMessage(); local = local.substring(local.lastIndexOf(':')+1); - return ""+message+": "+local+"
"; + return ""+message+": "+local+"
"; } public void doGet(HttpServletRequest request, HttpServletResponse response) @@ -175,7 +175,7 @@ public class Servlet extends HttpServlet { if(!log.equals("")) out.println(msg_out(log)); } catch (TransformerConfigurationException tce) { - out.println(exc_out("stylesheet error", tce)); + out.println(exc_out("Stylesheet Error", tce)); } catch (Exception e) { out.println(exc_out(null, e)); } @@ -299,7 +299,7 @@ public class Servlet extends HttpServlet { out.println(msg_out(server.reload(data[i]))); } } catch (TransformerConfigurationException tce) { - out.println(exc_out("stylesheet error", tce)); + out.println(exc_out("Stylesheet Error", tce)); } catch (Exception e) { out.println(exc_out(null, e)); } -- 2.39.2