Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3781

Admin UI does not work when wiring Solr into a larger web application

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 4.0-BETA
    • None
    • Admin UI
    • win7 jetty-distribution-7.6.5.v20120716

      startup param:
      -Djetty.port=8084 -DzkRun -Dbootstrap_conf=true

    Description

      if i am wiring Solr into a larger web application which controls the web context root, you will probably want to mount Solr under a path prefix (app.war with /app/solr mounted into it, for example).
      For example:

      RootApp.war-------- /
      myApp.war---------------/myApp
      prefixPath-------------------xxx
      jsdir------------------------------js
      js file--------------------------------main.js
      admin file-------------------------admin.html

      org.apache.solr.servlet.LoadAdminUiServlet
      line:49 InputStream in = getServletContext().getResourceAsStream("/admin.html");
      can't find admin/html because it's in the prefixPath directory

      org.apache.solr.cloud.ZkController
      line:149-150
      this.nodeName = this.hostName + ':' + this.localHostPort + '_' + this.localHostContext;
      this.baseURL = this.localHost + ":" + this.localHostPort + "/" + this.localHostContext;

      it can't match this condition
      baseURL need to be http://xx:xx/myApp/myPrefixPath
      eg. http://xx:xx/myApp/xxx

      Attachments

        1. LoadAdminUiServlet_take2.patch
          2 kB
          Sam Kass
        2. LoadAdminUiServlet.java.chabot
          2 kB
          Michael Chabot
        3. LoadAdminUiServlet.patch
          0.7 kB
          Sam Kass
        4. web.xml
          6 kB
          Sam Kass
        5. web.xml.chabot
          1 kB
          Michael Chabot

        Activity

          People

            Unassigned Unassigned
            shenjc shenjc
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified