| | |
| | | * folgenden Eintraege enthalten:</p> |
| | | * <pre> |
| | | * <Environment name="wbxFileBase" type="java.lang.String" value="absoluter/pfad/zur/dateiablage" override="false" /> |
| | | * <Environment name="wbxPubDir" type="java.lang.String" value="/www" override="false" /> |
| | | * <Environment name="wbxPubDirName" type="java.lang.String" value="/www" override="false" /> |
| | | * <Environment name="wbxFeedTitle" type="java.lang.String" value="Newsfeed" override="false" /> |
| | | * <Environment name="wbxFeedSubtitle" type="java.lang.String" value="Text des Untertitels" override="false" /> |
| | | * <Environment name="wbxFeedCopyright" type="java.lang.String" value="Text des Copyright-Hinweises" override="false" /> |
| | |
| | | |
| | | private static final Logger logger = Logger.getLogger(FeedServlet.class.getName()); |
| | | |
| | | public static final String JNDI_CTX_NAME = "java:comp/env"; |
| | | public static final String WBX_FILE_BASE = "wbxFileBase"; |
| | | public static final String WBX_PUB_DIR = "wbxPubDir"; |
| | | //public static final String JNDI_CTX_NAME = "java:comp/env"; |
| | | //public static final String WBX_FILE_BASE = "wbxFileBase"; |
| | | //public static final String WBX_PUB_DIR = "wbxPubDir"; |
| | | public static final String WBX_MAX_FEED_DEPTH = "wbxMaxFeedDepth"; |
| | | public static final String WBX_MAX_FEED_ENTRIES = "wbxMaxFeedEntries"; |
| | | public static final String WBX_FEED_TITLE = "wbxFeedTitle"; |
| | |
| | | String zielPfad = url.substring(url.indexOf(contextPath)); |
| | | logger.fine(zielPfad); |
| | | WbxUtils wu = new WbxUtils(); |
| | | String basis = wu.getJNDIParameter(WBX_FILE_BASE, WbxUtils.EMPTY_STRING); |
| | | String basis = wu.getJNDIParameter(WbxUtils.WBX_FILE_BASE, WbxUtils.EMPTY_STRING); |
| | | logger.fine("basis: " + basis); |
| | | StringBuffer pfad = new StringBuffer(); |
| | | pfad.append(basis); |
| | | pfad.append(zielPfad.replace(contextPath, wu.getJNDIParameter(WBX_PUB_DIR, WbxUtils.EMPTY_STRING))); |
| | | pfad.append(zielPfad.replace(contextPath, wu.getJNDIParameter(WbxUtils.WBX_PUB_DIR_NAME, WbxUtils.WBX_DEFAULT_PUB_DIR_NAME))); |
| | | logger.fine("pfad: " + pfad); |
| | | String dirStr = pfad.toString().substring(0, pfad.lastIndexOf("/")); |
| | | logger.fine("dirStr: " + dirStr); |
| | |
| | | |
| | | String urlStr = f.getAbsolutePath(); |
| | | urlStr = urlStr.replace(basis, domain); |
| | | urlStr = urlStr.replace(wu.getJNDIParameter(WBX_PUB_DIR, WbxUtils.EMPTY_STRING), contextPath); |
| | | urlStr = urlStr.replace(wu.getJNDIParameter(WbxUtils.WBX_PUB_DIR_NAME, WbxUtils.WBX_DEFAULT_PUB_DIR_NAME), contextPath); |
| | | |
| | | logger.fine(urlStr); |
| | | |