Thomas Mortagne wrote:
On Fri, Dec 5, 2008 at 11:01 AM, Sergiu Dumitriu <[email protected]> wrote:
Thomas Mortagne wrote:
On Fri, Dec 5, 2008 at 4:20 AM, Sergiu Dumitriu <[email protected]> wrote:
tmortagne (SVN) wrote:
Author: tmortagne Date: 2008-12-04 14:00:49 +0100 (Thu, 04 Dec 2008) New Revision: 14542
Log: XWIKI-2824: Support multiwiki using path urls and not host urls
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java =================================================================== + public String getServletPath(String wikiName, XWikiContext context) + { + // unless we are in virtual wiki path mode we should return null + if (!context.getMainXWiki().equalsIgnoreCase(wikiName) && "1".equals(Param("xwiki.virtual.usepath", "0"))) { + String database = context.getDatabase(); + try { + context.setDatabase(context.getMainXWiki()); + XWikiDocument doc = getDocument(getServerWikiPage(wikiName), context); + BaseObject serverobject = doc.getObject("XWiki.XWikiServerClass"); + if (serverobject != null) { + String server = serverobject.getStringValue("server"); + return "wiki/" + server + "/"; + } + } catch (Exception e) { + LOG.error("Failed to get URL for provided wiki [" + wikiName + "]", e); + } finally { + context.setDatabase(database); + } + } + This means that only struts is accepted for this kind of virtual servers? What about xmlrpc, webdav, wysiwg, gwt, and the incoming REST? It's really difficult to have a full support of url based multiwiki with the current tricky way of handling URLs (it's already pretty difficult to support only struts without breaking anything...). We really need the unique component based entry point we discussed and get rid of struts.
Doesn't this work:
httpServletRequest.getRequestDispatcher(internalPath).forward(httpServletRequest, httpServletresponse)
where internalPath is the path without the /wiki/wikiname part?
Where do you want to add this code ?
com.xpn.xwiki.web.XWikiRequestProcessor -- Sergiu Dumitriu http://purl.org/net/sergiu/