ResourceServlet.java revision 2c6e1e062b5e873f228b9b285b3681afb0f93767
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Servlet to handle the REST interface
*
*
* Changes and additions by
* @author laszlo
* @author aegloff
*/
immediate = true,
public final class ResourceServlet
extends HttpServlet {
//TODO Decide where to put the web and the java resources. Now both are in root
}
throws ServletException, IOException {
} else {
}
// Try to find in extensions folder
}
break;
}
}
// Look in the bundle rather than the servlet context, as we're using shared servlet contexts
} else {
}
} else {
}
}
}
throws IOException {
if (contentType != null) {
} else {
}
if (lastModified != 0) {
}
} else {
}
}
long lastModified = 0;
try {
} catch (Exception e) {
// Do nothing
}
if (lastModified == 0) {
if (f.exists()) {
lastModified = f.lastModified();
}
}
}
return lastModified;
}
return "application/javascript";
}
return null;
}
modSince /= 1000;
resTimestamp /= 1000;
}
throws IOException {
try {
int len = 0;
byte[] buf = new byte[1024];
int n;
len += n;
}
} finally {
}
}
}
}
}