]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo/src/it/unibo/cs/helm/uwobo/Server.java
...
[helm.git] / helm / uwobo / src / it / unibo / cs / helm / uwobo / Server.java
index 9b33b662977fc37cb9c9e5d915641396c9dbb6f5..293b2b91ba1a1533dfd75d3d61ce280eda551b54 100644 (file)
@@ -1,3 +1,27 @@
+/* Copyright (C) 2001, HELM Team
+ *
+ * This file is part of UWOBO, developed at the Computer Science
+ * Department, University of Bologna, Italy.
+ * 
+ * UWOBO is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * UWOBO is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with UWOBO; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA  02111-1307, USA.
+ *
+ * For details, see the UWOBO World-Wide-Web page,
+ * http://cs.unibo.it/helm/uwobo
+ */
+
 package it.unibo.cs.helm.uwobo;
 
 import java.io.*;
@@ -39,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;
        };
 
@@ -197,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("") ? "" : "<br />" + msg2);
+                      return htmlOfWarning(msg);
                    } else {
                       String res =
                          "Error: There is already a stylesheet with keyword \""+
@@ -213,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!");
 
@@ -381,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 {