XWiki Platform
  1. XWiki Platform
  2. XWIKI-7484

Write a log line in the console instructing the user to open XWiki in a browser

    Details

    • Difficulty:
      Easy
    • Similar issues:

      Description

      This is related to XWIKI-6883. First-time administrators don't know that after launching start-xwiki they are supposed to open the wiki in a browser, and instead wait for something to happen. A log line instructing them to open the browser themselves isn't the best solution, but at least it could help.

        Issue Links

          Activity

          Hide
          Sergiu Dumitriu added a comment -

          Done in fe11351

          Show
          Sergiu Dumitriu added a comment - Done in fe11351
          Hide
          Vincent Massol added a comment -

          FTR Vincent asked on GitHub:

          Hi Sergiu,

          I don't understand why you did this only for Jetty. This won't work on say Tomcat for example.

          It would be very easy to add a ServletContextListener that prints the same information (or use the existing XWikiServletContextListener and add a log there).

          It's also a lot simpler since here you've had to create a new module, depend on some Jetty APIs, etc. If tomorrow we move to another servlet container, the work has to be redone.

          wdyt?

          Sergiu's reply:

          Several reasons:

          • The time when the xwiki application is loaded isn't the same as when the server can be accessed. Usually, on the standalone distribution the difference is negligible, since the root webapp is very small, there aren't any other applications to load, and starting the connector takes less than a second. Still, when deploying XWiki among other applications, the time between when XWiki is loaded and the server starts listening on a port can be quite significant. Only Jetty itself knows when the browser can really be started.
          • The original issue was supposed to help first time users trying out the standalone distribution, users that didn't know what to do next. This isn't about informing when XWiki is ready, but about what to do next. So, I assumed that someone doing a manual installation will know that a web application should be opened in a browser, not in a .bat. And going back to the previous item, a log displayed by an ServletContextListener will be followed by other logs displayed by Jetty itself, so it won't be as easy to notice if it isn't the last line displayed.
          • IMO the only purpose of this message is to be seen in the "black window with text" that appears when running start_xwiki.bat, so I don't think that it makes sense as a generic log message. For that there's usually the container's own log message notifying that context path /xwiki has been deployed.
          Show
          Vincent Massol added a comment - FTR Vincent asked on GitHub: Hi Sergiu, I don't understand why you did this only for Jetty. This won't work on say Tomcat for example. It would be very easy to add a ServletContextListener that prints the same information (or use the existing XWikiServletContextListener and add a log there). It's also a lot simpler since here you've had to create a new module, depend on some Jetty APIs, etc. If tomorrow we move to another servlet container, the work has to be redone. wdyt? Sergiu's reply: Several reasons: The time when the xwiki application is loaded isn't the same as when the server can be accessed. Usually, on the standalone distribution the difference is negligible, since the root webapp is very small, there aren't any other applications to load, and starting the connector takes less than a second. Still, when deploying XWiki among other applications, the time between when XWiki is loaded and the server starts listening on a port can be quite significant. Only Jetty itself knows when the browser can really be started. The original issue was supposed to help first time users trying out the standalone distribution, users that didn't know what to do next. This isn't about informing when XWiki is ready, but about what to do next. So, I assumed that someone doing a manual installation will know that a web application should be opened in a browser, not in a .bat. And going back to the previous item, a log displayed by an ServletContextListener will be followed by other logs displayed by Jetty itself, so it won't be as easy to notice if it isn't the last line displayed. IMO the only purpose of this message is to be seen in the "black window with text" that appears when running start_xwiki.bat, so I don't think that it makes sense as a generic log message. For that there's usually the container's own log message notifying that context path /xwiki has been deployed.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: