[英]Spymemcached conflict with hibernate-memcached and webapp-runner
[英]Context path conflict with Spring UrlTag in webapp-runner?
我們有一個 Java/Spring 應用程序部署到 Heroku,使用優秀的webapp-runner
作為 Tomcat-lite servlet 容器。 在從 7.0.27.1 升級到 7.0.31.1 時,設置“/”的默認上下文路徑的行為似乎會導致<spring:url>
標簽出現問題。 具體來說,使用“/”的默認上下文路徑,像<spring:url value="/foo/bar"/>
這樣的標簽最終會被渲染為//foo/bar
。 例如,我在 OS X 上測試的所有瀏覽器(Chrome、Safari、Firefox)似乎都沒有特別優雅地處理這些,並嘗試加載http://foo/bar
,導致各種混亂。
我可以想到兩種解決方法:
webapp-runner
指定--context-path ""
參數 - 這看起來是“最好的”,因為它對應於 7.0.27.1 行為<spring:url context="" .../>
- 考慮SpringUrl
如何使用前導斜杠來確定UrlType
,不確定可能會產生什么額外的后果。這兩者是否合理? 如果沒有,我應該考慮其他一些解決方案嗎?
webapp-runner-7.0.34.1 已將默認的--context-path
回""
。 如果您升級,它應該可以解決您的問題。
我有類似的雙斜杠問題//從 webapp-runner 7.0.34.0 升級到webapp-runner 7.0.34.1 為我解決了這個問題。
我已經嘗試過<spring:url>
和${pageContext.request.contextPath}
。 升級 webapp-runner 解決了這兩種情況下的問題。
更多詳情: http : //bit.ly/1zuL1T1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.