| | |
| | | |
| | | package de.uhilger.wbx.web; |
| | | |
| | | import de.uhilger.wbx.WbxUtils; |
| | | import java.io.File; |
| | | import java.util.logging.Logger; |
| | | import javax.servlet.ServletContext; |
| | |
| | | * |
| | | * @return Verzeichnis 'daten' der WebBox |
| | | */ |
| | | public static File getWbxDataDir(ServletContext ctx) { |
| | | private File getWbxDataDir(ServletContext ctx) { |
| | | File file = getWbxDir(ctx); |
| | | file = new File(file, "daten/"); |
| | | logger.fine("WebBox Datenbasis: " + file.getAbsolutePath()); |
| | | return file; |
| | | } |
| | | |
| | | public static File getWbxDir(ServletContext ctx) { |
| | | private File getWbxDir(ServletContext ctx) { |
| | | String path = ctx.getRealPath("/"); |
| | | logger.fine("getRealPath: " + path); // file-cms in webapps |
| | | File file = new File(path); |
| | |
| | | * @param ctx der ServletContext, in den die Angabe eingetragen wird. Dort |
| | | * ist anschliessend die Angabe unter Initialiser.FILE_BASE abrufbar |
| | | */ |
| | | public static void ablageErmitteln(ServletContext ctx) { |
| | | private void ablageErmitteln(ServletContext ctx) { |
| | | Object o = ctx.getInitParameter(DATENABLAGE); |
| | | try { |
| | | if(o instanceof String) { |