+/* 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.*;
public class Server {
private static class Style implements Serializable {
public String fileName;
- public long lastModified;
public Templates stylesheet;
};
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 \""+
Style style = new Style();
style.fileName = filename;
- style.lastModified = new File(filename).lastModified();
String res = compileStylesheet(style,key);
log("done!");
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 {