Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-2056

The URL Factory should use the contextPath instead of the contextName

    XMLWordPrintable

    Details

    • Similar issues:

      Description

      In web.XWikiServletURLFactory#init, the first path of the URL (wrongly name servletPath) is initialized with ServletContext().getServletContextName(), which should be used for the application name displayed in a container management application, and not as part of the URL. The proper value is request.getContextPath(), which is automatically set to reflect the application location.

      This will allow:

      • Easy changing the application directory and context name; right now, the displayName property in web.xml must be changed, too
      • Use a proper display name to reflect the application contents (XWiki Enterprise, XWiki Watch, Chronopolys, etc)

        Attachments

          Activity

            People

            Assignee:
            sdumitriu Sergiu Dumitriu
            Reporter:
            sdumitriu Sergiu Dumitriu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: