public class HostManagerServlet
extends HttpServlet implements ContainerServlet {
+ private static final long serialVersionUID = 1L;
// ----------------------------------------------------- Instance Variables
// Validate and create appBase
File appBaseFile = null;
+ File file = null;
if (appBase == null || appBase.length() == 0) {
- appBase = name;
+ file = new File(name);
+ } else {
+ file = new File(appBase);
}
- File file = new File(appBase);
if (!file.isAbsolute())
- file = new File(System.getProperty("catalina.base"), appBase);
+ file = new File(System.getProperty("catalina.base"), file.getPath());
try {
appBaseFile = file.getCanonicalFile();
} catch (IOException e) {
try {
is.close();
} catch (IOException e) {
+ // Ignore
}
}
if (os != null) {
try {
os.close();
} catch (IOException e) {
+ // Ignore
}
}
}